mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
49371b5420
commit
5e2625eebd
2 changed files with 11 additions and 0 deletions
6
benchmark/bm_vm2_dstr.rb
Normal file
6
benchmark/bm_vm2_dstr.rb
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue