Skip to content

Commit c50ae44

Browse files
committed
Step 4: Rerun the proc-call-vs-yield README sample
Step 3 dropped its "unused block" report, but the README still showed it ranked first, which would give readers the wrong ranking. The new sample is from ruby_4.0: yield, then block + yield (1.23x slower), then block.call (1.41x slower), the same order as 22 of 26 jobs in CI run 35927028164.
1 parent 07b844c commit c50ae44

1 file changed

Lines changed: 11 additions & 13 deletions

File tree

‎README.md‎

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,23 +1061,21 @@ Comparison:
10611061

10621062
```
10631063
$ ruby -v code/proc-and-block/proc-call-vs-yield.rb
1064-
ruby 4.0.0 (2025-12-25 revision 553f1675f3) +PRISM [arm64-darwin24]
1064+
ruby 4.0.7 (2026-09-15 revision 229531a6cf) +PRISM [aarch64-linux]
10651065
Warming up --------------------------------------
1066-
block.call 2.261M i/100ms
1067-
block + yield 2.314M i/100ms
1068-
unused block 3.025M i/100ms
1069-
yield 2.971M i/100ms
1066+
yield 2.156M i/100ms
1067+
block + yield 1.605M i/100ms
1068+
block.call 1.609M i/100ms
10701069
Calculating -------------------------------------
1071-
block.call 22.057M (± 6.0%) i/s (45.34 ns/i) - 110.796M in 5.043129s
1072-
block + yield 23.280M (± 0.6%) i/s (42.96 ns/i) - 117.997M in 5.068779s
1073-
unused block 30.609M (± 1.3%) i/s (32.67 ns/i) - 154.268M in 5.040991s
1074-
yield 29.921M (± 0.6%) i/s (33.42 ns/i) - 151.512M in 5.063842s
1070+
yield 20.615M (±10.0%) i/s (48.51 ns/i) - 103.495M in 5.020450s
1071+
block + yield 16.824M (± 9.2%) i/s (59.44 ns/i) - 85.066M in 5.056288s
1072+
block.call 14.608M (±14.3%) i/s (68.46 ns/i) - 73.995M in 5.065432s
10751073
10761074
Comparison:
1077-
unused block: 30608512.5 i/s
1078-
yield: 29921356.8 i/s - 1.02x slower
1079-
block + yield: 23279981.0 i/s - 1.31x slower
1080-
block.call: 22056758.6 i/s - 1.39x slower
1075+
yield: 20614679.3 i/s
1076+
block + yield: 16823796.9 i/s - 1.23x slower
1077+
block.call: 14607819.3 i/s - 1.41x slower
1078+
10811079
```
10821080

10831081
### String

0 commit comments

Comments
 (0)