Skip to content

Commit

Permalink
Add benchmarks for regexp and array.
Browse files Browse the repository at this point in the history
  • Loading branch information
macournoyer committed Apr 10, 2009
1 parent 55499ce commit 23bd30e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bench/bm_vm2_array.rb
@@ -0,0 +1,5 @@
i=0
while i<6000000 # benchmark loop 2
i = i + 1
a = [1,2,3,4,5,6,7,8,9,10]
end
7 changes: 7 additions & 0 deletions bench/bm_vm2_regexp.rb
@@ -0,0 +1,7 @@
i=0
str = 'xxxhogexxx'
while i<6000000 # benchmark loop 2
# /hoge/ =~ str
/hoge/.match str
i = i + 1
end

0 comments on commit 23bd30e

Please sign in to comment.