Permalink
Browse files

Add benchmarks for regexp and array.

  • Loading branch information...
1 parent 55499ce commit 23bd30e5fa6691b54bdabc2f409ac39f50219026 @macournoyer macournoyer committed Apr 10, 2009
Showing with 12 additions and 0 deletions.
  1. +5 −0 bench/bm_vm2_array.rb
  2. +7 −0 bench/bm_vm2_regexp.rb
View
@@ -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
View
@@ -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.