bench: document the two AOT mechanisms behind the results table - #582
Conversation
The Performance table presents one undifferentiated AOT column, which makes the reduce row (1.7x slower under AOT) read as an anomaly. The emitted Go splits the fixtures cleanly: fib/tak/loop-recur lower to native code over unboxed ints (the 20-26x wins); the four seq rows only get a native run wrapper around the same boxed runtime calls the VM makes, so they tie or lose by construction until #270/#358 reach those bodies. Name the split under the table so every row reads as expected. Framing only — numbers are unchanged from the #578 recapture. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0fb8f89 to
f0b6b48
Compare
|
Silly question, why are those not fully lowered? |
|
@nooga nor silly at all! Two missing pieces: lowering function values (#270) and native collection representations (#358). Until those land, the AOT build and the VM run the same code for those four rows. fib/tak/loop-recur type all the way down to scalars (int/float locals, arithmetic, direct recursion), so gogen can emit straight Go. |
What
Adds a "Reading the AOT column" section under the Performance table in
benchmark/results.md, splitting the seven fixtures by what the AOT build does with them: three lower to native Go (fib, tak, loop-recur — the 20-26x wins), four only get a nativerunwrapper around the same boxed runtime calls the VM makes (reduce, map-filter, persistent-map, transducers).Why
One undifferentiated AOT column makes the reduce row (1.7x slower under AOT) read as an anomaly. The emitted Go shows it isn't: the reduction never lowers —
reduce.gocalls the identicalrt.Reduce3with a boxed+, plus wrapper dispatch — so parity-or-worse is the expected result for those rows until #270/#358 reach them. Naming the split gives the table a stable interpretation as those issues land, and the map-filter flip in #578 (now a small AOT win) reads the same way: wrapper-cost noise around parity, not lowering.Continues the read from the #552 review thread. Issue/PR links stay out of the doc itself — README and the benchmark docs carry none, so the section names the boundary plainly and the references live here. Framing only; numbers are unchanged from the #578 recapture.
No urgency on review — docs-only, whenever convenient.
🤖 Generated with Claude Code