diff options
author | isaacs <i@izs.me> | 2013-02-12 11:07:37 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-02-20 02:14:35 +0400 |
commit | 2a2942bd7f39f687e61188fc593ab9d23ceff1c8 (patch) | |
tree | 18e3d67339113bdf4872d656235bf093276113f9 /benchmark | |
parent | fef35fc4f1da9e06790d5b3b34b3bcdb085dd3a2 (diff) |
bench: Move string_creation into misc
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/misc/string_creation.js | 16 | ||||
-rw-r--r-- | benchmark/string_creation.js | 6 |
2 files changed, 16 insertions, 6 deletions
diff --git a/benchmark/misc/string_creation.js b/benchmark/misc/string_creation.js new file mode 100644 index 00000000000..74dabd66c02 --- /dev/null +++ b/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); +} diff --git a/benchmark/string_creation.js b/benchmark/string_creation.js deleted file mode 100644 index 7f81ec1090e..00000000000 --- a/benchmark/string_creation.js +++ /dev/null @@ -1,6 +0,0 @@ - - -for (var i = 0; i < 9e7; i++) { - s = '01234567890'; - s[1] = "a"; -} |