We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e608d1 commit b0bb57eCopy full SHA for b0bb57e
benchmarks.yml
@@ -120,6 +120,10 @@ send_rubyfunc_block:
120
desc: send_rubyfunc_block just calls a known Ruby function with a block many, many times.
121
category: micro
122
single_file: true
123
+send_bmethod:
124
+ desc: send_bmethod just calls a known Ruby bmethod many, many times.
125
+ category: micro
126
+ single_file: true
127
fib:
128
desc: Fib is a simple exponential-time recursive Fibonacci number generator.
129
benchmarks/send_bmethod.rb
@@ -0,0 +1,11 @@
1
+require_relative '../harness/loader'
2
+
3
+define_method(:zero) { :b }
4
+define_method(:one) { |arg| arg }
5
6
+run_benchmark(500) do
7
+ 2_000_000.times do |i|
8
+ zero
9
+ one 123
10
+ end
11
+end
0 commit comments