Update benchmark.js test file in order to reduce the time `test-benchmark-buffer` test takes to run
The following pr
updates the runBenchMark
function by:
- Breaking the
runBenchMark
function into thegetArgv
for the purpose of getting theargv
array. - When constructing the
argv
array, we are reducing theargs
array parameter. That way we make onepush
operation instead of two per iteration. - Instead of contatinating an array per iteration on line https://github.com/nodejs/node/compare/master...fesebuv:fesebuv-updates?expand=1#diff-f282ba153a1c9657bd17a47caabab8bfR29 we are
pushing
that line into an array and thenjoining
that array when needed.
Run
time ./node ./test/sequential/test-benchmark-buffer
- Should see time reducing from
real ~0m5.570s
toreal ~0m5.479s
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines