Skip to content

Commit 8b152fc

Browse files
AndreasMadsenjasnell
authored andcommitted
benchmark: change the execution order
This changes the execution order from "iter, file, binary" to "file, iter, binary". This means the csv no longer has to buffered completely. This also has the added effect that stopping compare.js early or interfering with performance only affects a single benchmark, instead of all of them. Refs: #8659 PR-URL: #9064 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Brian White <[email protected]>
1 parent a5046bf commit 8b152fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

benchmark/compare.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ if (benchmarks.length === 0) {
4040
// Create queue from the benchmarks list such both node versions are tested
4141
// `runs` amount of times each.
4242
const queue = [];
43-
for (let iter = 0; iter < runs; iter++) {
44-
for (const filename of benchmarks) {
43+
for (const filename of benchmarks) {
44+
for (let iter = 0; iter < runs; iter++) {
4545
for (const binary of binaries) {
4646
queue.push({ binary, filename, iter });
4747
}

0 commit comments

Comments
 (0)