summaryrefslogtreecommitdiff
path: root/benchmark/arrays/zero-float.js
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/arrays/zero-float.js')
-rw-r--r--benchmark/arrays/zero-float.js35
1 files changed, 0 insertions, 35 deletions
diff --git a/benchmark/arrays/zero-float.js b/benchmark/arrays/zero-float.js
deleted file mode 100644
index de2e9bdba6..0000000000
--- a/benchmark/arrays/zero-float.js
+++ /dev/null
@@ -1,35 +0,0 @@
-'use strict';
-const common = require('../common.js');
-
-const bench = common.createBenchmark(main, {
- type: [
- 'Array',
- 'Buffer',
- 'Int8Array',
- 'Uint8Array',
- 'Int16Array',
- 'Uint16Array',
- 'Int32Array',
- 'Uint32Array',
- 'Float32Array',
- 'Float64Array'
- ],
- n: [25e6]
-});
-
-function main({ type, n }) {
- const clazz = global[type];
-
- bench.start();
- const arr = new clazz(n);
- for (var i = 0; i < 10; ++i) {
- run();
- }
- bench.end(n);
-
- function run() {
- for (var j = 0, k = arr.length; j < k; ++j) {
- arr[j] = 0.0;
- }
- }
-}