File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,14 @@ cfunc_itself:
112112 desc : cfunc_itself just calls the 'itself' method many, many times.
113113 category : micro
114114 single_file : true
115+ send_cfunc_block :
116+ desc : send_cfunc_block just calls a known C function with a block many, many times.
117+ category : micro
118+ single_file : true
119+ 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
115123fib :
116124 desc : Fib is a simple exponential-time recursive Fibonacci number generator.
117125 category : micro
Original file line number Diff line number Diff line change 1+ require_relative '../harness/loader'
2+
3+ ARR = [ ]
4+
5+ run_benchmark ( 500 ) do
6+ 2_000_000 . times do |i |
7+ ARR . each { }
8+ end
9+ end
Original file line number Diff line number Diff line change 1+ require_relative '../harness/loader'
2+
3+ class C
4+ def ruby_func
5+ # Don't even yield
6+ end
7+ end
8+
9+ INSTANCE = C . new
10+
11+ run_benchmark ( 500 ) do
12+ 2_000_000 . times do |i |
13+ INSTANCE . ruby_func { }
14+ end
15+ end
You can’t perform that action at this time.
0 commit comments