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.
25 lines
1.1 KiB
Text
25 lines
1.1 KiB
Text
// Speedup ratios: JIT vs each implementation
|
|
// "A diagram is worth 10,000 words." — russell@unturf.com
|
|
digraph speedup {
|
|
rankdir=TB
|
|
node [shape=box, style="filled,rounded", fontname="Helvetica", fontsize=12]
|
|
edge [fontname="Helvetica", fontsize=10, penwidth=2]
|
|
label="How much faster is the JIT? (ack(3,4) speedup ratios)"
|
|
labelloc=t
|
|
fontsize=14
|
|
fontname="Helvetica Bold"
|
|
|
|
jit [label="C + x86_64 JIT\n0.19 ms" fillcolor="#00b894" fontcolor=white shape=doubleoctagon width=2.5]
|
|
|
|
cpython [label="CPython\n1.3 ms" fillcolor="#0984e3" fontcolor=white]
|
|
asm [label="x86_64 Assembly\n8 ms" fillcolor="#6c5ce7" fontcolor=white]
|
|
cinterp [label="C interpreter\n20 ms" fillcolor="#fdcb6e"]
|
|
pyvm [label="Python bytecode VM\n149 ms" fillcolor="#e17055" fontcolor=white]
|
|
|
|
jit -> cpython [label=" 7x faster " color="#00b894" fontcolor="#00b894"]
|
|
jit -> asm [label=" 42x faster " color="#6c5ce7" fontcolor="#6c5ce7"]
|
|
jit -> cinterp [label=" 105x faster " color="#fdcb6e" fontcolor="#b8860b"]
|
|
jit -> pyvm [label=" 784x faster " color="#e17055" fontcolor="#e17055"]
|
|
|
|
{rank=same; cpython; asm; cinterp; pyvm}
|
|
}
|