diff options
Diffstat (limited to 'benchmark/buffers/buffer-compare.js')
-rw-r--r-- | benchmark/buffers/buffer-compare.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/benchmark/buffers/buffer-compare.js b/benchmark/buffers/buffer-compare.js index f7abb4b3d9..cb4f0f475c 100644 --- a/benchmark/buffers/buffer-compare.js +++ b/benchmark/buffers/buffer-compare.js @@ -24,19 +24,18 @@ const common = require('../common.js'); const bench = common.createBenchmark(main, { size: [16, 512, 1024, 4096, 16386], - millions: [1] + n: [1e6] }); -function main({ millions, size }) { - const iter = millions * 1e6; +function main({ n, size }) { const b0 = Buffer.alloc(size, 'a'); const b1 = Buffer.alloc(size, 'a'); b1[size - 1] = 'b'.charCodeAt(0); bench.start(); - for (var i = 0; i < iter; i++) { + for (var i = 0; i < n; i++) { Buffer.compare(b0, b1); } - bench.end(iter / 1e6); + bench.end(n); } |