From 2a2942bd7f39f687e61188fc593ab9d23ceff1c8 Mon Sep 17 00:00:00 2001 From: isaacs Date: Mon, 11 Feb 2013 23:07:37 -0800 Subject: [PATCH] bench: Move string_creation into misc --- benchmark/misc/string_creation.js | 16 ++++++++++++++++ benchmark/string_creation.js | 6 ------ 2 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 benchmark/misc/string_creation.js delete mode 100644 benchmark/string_creation.js diff --git a/benchmark/misc/string_creation.js b/benchmark/misc/string_creation.js new file mode 100644 index 0000000000..74dabd66c0 --- /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 7f81ec1090..0000000000 --- a/benchmark/string_creation.js +++ /dev/null @@ -1,6 +0,0 @@ - - -for (var i = 0; i < 9e7; i++) { - s = '01234567890'; - s[1] = "a"; -}