File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11require_relative '../harness/loader'
22
33class C
4- def ruby_func ( call_block )
5- # Don't even yield
6- yield if call_block
4+ CALL_BLOCK = false
5+
6+ def ruby_func
7+ # Don't even yield. But we leave yield to suppress a warning.
8+ yield if CALL_BLOCK
79 end
810end
911
@@ -12,14 +14,14 @@ def ruby_func(call_block)
1214run_benchmark ( 500 ) do
1315 500_000 . times do |i |
1416 # Manually unrolling to avoid loop overhead
15- INSTANCE . ruby_func ( false ) { }
16- INSTANCE . ruby_func ( false ) { }
17- INSTANCE . ruby_func ( false ) { }
18- INSTANCE . ruby_func ( false ) { }
19- INSTANCE . ruby_func ( false ) { }
20- INSTANCE . ruby_func ( false ) { }
21- INSTANCE . ruby_func ( false ) { }
22- INSTANCE . ruby_func ( false ) { }
23- INSTANCE . ruby_func ( false ) { }
17+ INSTANCE . ruby_func { }
18+ INSTANCE . ruby_func { }
19+ INSTANCE . ruby_func { }
20+ INSTANCE . ruby_func { }
21+ INSTANCE . ruby_func { }
22+ INSTANCE . ruby_func { }
23+ INSTANCE . ruby_func { }
24+ INSTANCE . ruby_func { }
25+ INSTANCE . ruby_func { }
2426 end
2527end
You can’t perform that action at this time.
0 commit comments