diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | benchmark/bm_vm2_method_missing.rb | 12 |
2 files changed, 17 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Wed Oct 17 16:25:34 2012 Koichi Sasada <ko1@atdot.net> + + * benchmark/bm_vm2_method_missing.rb: add a benchmark to measure + performance of invoking `method_missing'. + Wed Oct 17 16:23:17 2012 Koichi Sasada <ko1@atdot.net> * vm_insnhelper.c (vm_getivar): fix to use `aux.index' instead of diff --git a/benchmark/bm_vm2_method_missing.rb b/benchmark/bm_vm2_method_missing.rb new file mode 100644 index 0000000000..2badc73101 --- /dev/null +++ b/benchmark/bm_vm2_method_missing.rb @@ -0,0 +1,12 @@ +class C + def method_missing mid + end +end + +obj = C.new + +i = 0 +while i<6_000_000 # benchmark loop 2 + i += 1 + obj.m; obj.m; obj.m; obj.m; obj.m; obj.m; obj.m; obj.m; +end |