Skip to content

Commit 2a2942b

Browse files
committed
bench: Move string_creation into misc
1 parent fef35fc commit 2a2942b

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

benchmark/misc/string_creation.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
var common = require('../common.js');
3+
var bench = common.createBenchmark(main, {
4+
millions: [100]
5+
})
6+
7+
function main(conf) {
8+
var n = +conf.millions * 1e6;
9+
bench.start();
10+
var s;
11+
for (var i = 0; i < n; i++) {
12+
s = '01234567890';
13+
s[1] = "a";
14+
}
15+
bench.end(n / 1e6);
16+
}

benchmark/string_creation.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)