Browse Source

bench: Move string_creation into misc

v0.9.11-release
isaacs 12 years ago
parent
commit
2a2942bd7f
  1. 16
      benchmark/misc/string_creation.js
  2. 6
      benchmark/string_creation.js

16
benchmark/misc/string_creation.js

@ -0,0 +1,16 @@
var common = require('../common.js');
var bench = common.createBenchmark(main, {
millions: [100]
})
function main(conf) {
var n = +conf.millions * 1e6;
bench.start();
var s;
for (var i = 0; i < n; i++) {
s = '01234567890';
s[1] = "a";
}
bench.end(n / 1e6);
}

6
benchmark/string_creation.js

@ -1,6 +0,0 @@
for (var i = 0; i < 9e7; i++) {
s = '01234567890';
s[1] = "a";
}
Loading…
Cancel
Save