Skip to content

Commit

Permalink
* benchmark/bm_vm2_dstr.rb: add a benchmark to measure
Browse files Browse the repository at this point in the history
  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
  • Loading branch information
ko1 committed Oct 16, 2012
1 parent 49371b5 commit 5e2625e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
Wed Oct 17 08:46:47 2012 Koichi Sasada <ko1@atdot.net>

* benchmark/bm_vm2_dstr.rb: add a benchmark to measure
performance of dynamic generated string ("foo#{bar}baz").

Wed Oct 17 08:32:46 2012 Koichi Sasada <ko1@atdot.net>

* compile.c (compile_dstr_fragments): use `putobject' instead of
Expand Down
6 changes: 6 additions & 0 deletions 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

0 comments on commit 5e2625e

Please sign in to comment.