aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark/vm2_poly_same_method.yml
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/vm2_poly_same_method.yml')
-rw-r--r--benchmark/vm2_poly_same_method.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/benchmark/vm2_poly_same_method.yml b/benchmark/vm2_poly_same_method.yml
new file mode 100644
index 0000000000..867c433cf8
--- /dev/null
+++ b/benchmark/vm2_poly_same_method.yml
@@ -0,0 +1,25 @@
+prelude: |
+ module AR; end
+ class AR::Base
+ def create_or_update
+ nil
+ end
+ def save
+ create_or_update
+ end
+ end
+ class Foo < AR::Base; end
+ class Bar < AR::Base; end
+ o1 = Foo.new
+ o2 = Bar.new
+benchmark:
+ vm2_poly_same_method: |
+ o1.save; o2.save;
+ o1.save; o2.save;
+ o1.save; o2.save;
+ o1.save; o2.save;
+ o1.save; o2.save;
+ o1.save; o2.save;
+ o1.save; o2.save;
+ o1.save; o2.save;
+loop_count: 6000000