From 335575e49bb6e57d646887a240caeebd3358e9f3 Mon Sep 17 00:00:00 2001 From: Peter Marshall Date: Mon, 16 Jul 2018 13:59:09 +0200 Subject: [PATCH] benchmark: remove arrays benchmark PR-URL: https://github.com/nodejs/node/pull/21831 Reviewed-By: Anatoli Papirovski Reviewed-By: Ruben Bridgewater Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca Reviewed-By: Yang Guo Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat --- benchmark/arrays/var-int.js | 35 -------------------------- benchmark/arrays/zero-float.js | 35 -------------------------- benchmark/arrays/zero-int.js | 35 -------------------------- test/parallel/test-benchmark-arrays.js | 7 ------ 4 files changed, 112 deletions(-) delete mode 100644 benchmark/arrays/var-int.js delete mode 100644 benchmark/arrays/zero-float.js delete mode 100644 benchmark/arrays/zero-int.js delete mode 100644 test/parallel/test-benchmark-arrays.js diff --git a/benchmark/arrays/var-int.js b/benchmark/arrays/var-int.js deleted file mode 100644 index 430737856313e4..00000000000000 --- a/benchmark/arrays/var-int.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] = (j ^ k) & 127; - } - } -} diff --git a/benchmark/arrays/zero-float.js b/benchmark/arrays/zero-float.js deleted file mode 100644 index de2e9bdba69474..00000000000000 --- 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; - } - } -} diff --git a/benchmark/arrays/zero-int.js b/benchmark/arrays/zero-int.js deleted file mode 100644 index 548691d3739e70..00000000000000 --- a/benchmark/arrays/zero-int.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; - } - } -} diff --git a/test/parallel/test-benchmark-arrays.js b/test/parallel/test-benchmark-arrays.js deleted file mode 100644 index 6e11d9743e0dac..00000000000000 --- a/test/parallel/test-benchmark-arrays.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -require('../common'); - -const runBenchmark = require('../common/benchmark'); - -runBenchmark('arrays', ['n=1', 'type=Array']);