summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-30 13:39:50 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-30 13:39:50 +0000
commitc4becf8aaf8b1dc27ca274457548117d703c65e5 (patch)
tree572ce157a49e03491ac9a9481dc0298442fa707a /benchmark
parent3bd05662883a14ce0ffe63666317d80faeb7afef (diff)
* benchmark/bm_vm2_defined_method.rb: added to measure performance of
bmethod (method defined by define_method()). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/bm_vm2_defined_method.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/benchmark/bm_vm2_defined_method.rb b/benchmark/bm_vm2_defined_method.rb
new file mode 100644
index 0000000..ad7555b
--- /dev/null
+++ b/benchmark/bm_vm2_defined_method.rb
@@ -0,0 +1,9 @@
+class Object
+ define_method(:m){}
+end
+
+i=0
+while i<6000000 # benchmark loop 2
+ i+=1
+ m; m; m; m; m; m; m; m;
+end