Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark misc #26925

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion benchmark/_benchmark_progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class BenchmarkProgress {
// Number of times each file will be run (roughly).
this.runsPerFile = queue.length / benchmarks.length;
this.currentFile = ''; // Filename of current benchmark.
this.currentFileConfig; // Configurations for current file
// Number of configurations already run for the current file.
this.completedConfig = 0;
// Total number of configurations for the current file
Expand Down
10 changes: 4 additions & 6 deletions benchmark/es/foreach-bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,18 @@ function useFor(n, items, count) {
bench.start();
for (var i = 0; i < n; i++) {
for (var j = 0; j < count; j++) {
/* eslint-disable no-unused-vars */
// eslint-disable-next-line no-unused-vars
const item = items[j];
/* esline-enable no-unused-vars */
}
}
bench.end(n);
}

function useForOf(n, items) {
var item;
bench.start();
for (var i = 0; i < n; i++) {
for (item of items) {}
// eslint-disable-next-line no-unused-vars
for (const item of items) {}
}
bench.end(n);
}
Expand All @@ -33,9 +32,8 @@ function useForIn(n, items) {
bench.start();
for (var i = 0; i < n; i++) {
for (var j in items) {
/* eslint-disable no-unused-vars */
// eslint-disable-next-line no-unused-vars
const item = items[j];
/* esline-enable no-unused-vars */
}
}
bench.end(n);
Expand Down
4 changes: 2 additions & 2 deletions doc/guides/writing-and-running-benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,6 @@ Supported options keys are:
[autocannon]: https://github.com/mcollina/autocannon
[wrk]: https://github.com/wg/wrk
[t-test]: https://en.wikipedia.org/wiki/Student%27s_t-test#Equal_or_unequal_sample_sizes.2C_unequal_variances
[git-for-windows]: http://git-scm.com/download/win
[nghttp2.org]: http://nghttp2.org
[git-for-windows]: https://git-scm.com/download/win
[nghttp2.org]: https://nghttp2.org
[benchmark-ci]: https://github.com/nodejs/benchmarking/blob/master/docs/core_benchmarks.md