summaryrefslogtreecommitdiff
path: root/benchmark/buffers/buffer-read-float.js
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/buffers/buffer-read-float.js')
-rw-r--r--benchmark/buffers/buffer-read-float.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/benchmark/buffers/buffer-read-float.js b/benchmark/buffers/buffer-read-float.js
index e105642972..dbccf57393 100644
--- a/benchmark/buffers/buffer-read-float.js
+++ b/benchmark/buffers/buffer-read-float.js
@@ -5,10 +5,10 @@ const bench = common.createBenchmark(main, {
type: ['Double', 'Float'],
endian: ['BE', 'LE'],
value: ['zero', 'big', 'small', 'inf', 'nan'],
- millions: [1]
+ n: [1e6]
});
-function main({ millions, type, endian, value }) {
+function main({ n, type, endian, value }) {
type = type || 'Double';
const buff = Buffer.alloc(8);
const fn = `read${type}${endian}`;
@@ -32,8 +32,8 @@ function main({ millions, type, endian, value }) {
buff[`write${type}${endian}`](values[type][value], 0);
bench.start();
- for (var i = 0; i !== millions * 1e6; i++) {
+ for (var i = 0; i !== n; i++) {
buff[fn](0);
}
- bench.end(millions);
+ bench.end(n);
}