diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-16 23:47:51 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-16 23:47:51 +0000 |
commit | 5e2625eebd5ab1c1224ea35d70ad544e67a4ee41 (patch) | |
tree | 75d68b4e06ac5f94f4c129d0eb01affeed095c7c /benchmark | |
parent | 49371b5420619c0729154939b13e02aceb471611 (diff) | |
download | ruby-5e2625eebd5ab1c1224ea35d70ad544e67a4ee41.tar.gz |
* benchmark/bm_vm2_dstr.rb: add a benchmark to measure
performance of dynamic generated string ("foo#{bar}baz").
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/bm_vm2_dstr.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/benchmark/bm_vm2_dstr.rb b/benchmark/bm_vm2_dstr.rb new file mode 100644 index 0000000000..58c0f7bbc3 --- /dev/null +++ b/benchmark/bm_vm2_dstr.rb @@ -0,0 +1,6 @@ +i = 0 +x = y = 'z' +while i<6_000_000 # benchmark loop 2 + i += 1 + str = "foo#{x}bar#{y}baz" +end |