lumbda/docs/benchmark-fib.dot
russell@unturf.com 5fb1f0cb17 Add benchmark dot diagrams showing performance differences
5 new diagrams (Graphviz DOT → PNG):
  benchmark-ack.dot      — ack(3,4) across all 5 tiers
  benchmark-sumto.dot    — sum-to(50k) across all 5 tiers
  benchmark-fib.dot      — fib(35) iterative across all 5 tiers
  benchmark-speedup.dot  — JIT speedup ratios (7x-784x)
  benchmark-binary-size.dot — 13KB asm vs 171KB C vs ~30MB Python

JIT: 0.19ms ack, 7x faster than CPython, 784x faster than Python VM.
Makefile docs target now auto-discovers all docs/*.dot files.
2026-04-16 13:01:32 -04:00

19 lines
846 B
Text

// fib(35) iterative benchmark — all implementations
// "A diagram is worth 10,000 words." — russell@unturf.com
digraph benchmark_fib {
rankdir=LR
node [shape=record, style=filled, fontname="Helvetica", fontsize=11]
edge [style=invis]
label="fib(35) iterative — time in milliseconds (lower is better)"
labelloc=t
fontsize=14
fontname="Helvetica Bold"
cpython [label="{CPython|0.006 ms}" fillcolor="#0984e3" fontcolor=white width=0.5]
cinterp [label="{C interpreter|0.06 ms}" fillcolor="#fdcb6e" width=1.0]
jit [label="{C + JIT|0.09 ms}" fillcolor="#00b894" fontcolor=white width=1.2]
asm [label="{Assembly|0.6 ms}" fillcolor="#6c5ce7" fontcolor=white width=3.0]
pyvm [label="{Python VM|0.75 ms}" fillcolor="#e17055" fontcolor=white width=3.5]
cpython -> cinterp -> jit -> asm -> pyvm
}