mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
467 B
31 lines
467 B
9 years ago
|
'use strict';
|
||
|
var common = require('../common.js');
|
||
|
var assert = require('assert');
|
||
|
var bench = common.createBenchmark(main, {
|
||
|
prim: [
|
||
|
null,
|
||
|
undefined,
|
||
|
'a',
|
||
|
1,
|
||
|
true,
|
||
|
{0: 'a'},
|
||
|
[1, 2, 3],
|
||
|
new Array([1, 2, 3])
|
||
|
],
|
||
|
n: [1e5]
|
||
|
});
|
||
|
|
||
|
function main(conf) {
|
||
|
var prim = conf.prim;
|
||
|
var n = +conf.n;
|
||
|
var x;
|
||
|
|
||
|
bench.start();
|
||
|
|
||
|
for (x = 0; x < n; x++) {
|
||
|
assert.deepEqual(new Array([prim]), new Array([prim]));
|
||
|
}
|
||
|
|
||
|
bench.end(n);
|
||
|
}
|