summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2020-07-03 18:02:43 -0700
committerGitHub <noreply@github.com>2020-07-03 18:02:43 -0700
commit24fa37d87a24dc932c1d778bcaf91204f5c12a76 (patch)
tree19c661338ecc6b8d5974b80a1ef77a738931cade /benchmark
parenta69dd699ee630dd1086627dbca15a218a8538b6f (diff)
Make Kernel#then, #yield_self, #frozen? builtin (#3283)
* Make Kernel#then, #yield_self, #frozen? builtin * Fix test_jit
Notes
Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/kernel_then.yml6
-rw-r--r--benchmark/mjit_kernel.yml (renamed from benchmark/mjit_class.yml)9
2 files changed, 15 insertions, 0 deletions
diff --git a/benchmark/kernel_then.yml b/benchmark/kernel_then.yml
new file mode 100644
index 0000000000..85f7341e33
--- /dev/null
+++ b/benchmark/kernel_then.yml
@@ -0,0 +1,6 @@
+benchmark:
+ kernel_then: 1.then { |i| i + 1 }
+ kernel_then_enum: 1.then
+ kernel_yield_self: 1.yield_self { |i| i + 1 }
+ kernel_yield_self_enum: 1.yield_self
+loop_count: 20000000
diff --git a/benchmark/mjit_class.yml b/benchmark/mjit_kernel.yml
index 22f95c2d4d..7720e65c2c 100644
--- a/benchmark/mjit_class.yml
+++ b/benchmark/mjit_kernel.yml
@@ -4,8 +4,17 @@ prelude: |
obj.class
end
+ def mjit_frozen?(obj)
+ obj.frozen?
+ end
+
+ str = ""
+ fstr = "".freeze
+
benchmark:
- mjit_class(self)
- mjit_class(1)
+ - mjit_frozen?(str)
+ - mjit_frozen?(fstr)
loop_count: 40000000