Skip to content
PT

Static copy

Copied from docs/en/performance/baseline.md in https://github.com/poppy-team/aipo-lang (MIT). Pinned to revision ce47c4e070404fc41722ccd8e2b7b808b99062a8, blob c6e642b83682ac5de5d8d6268c6da56de6d0ef2f. The source repository remains canonical; this copy is refreshed through a sync pull request, not live.

Aipo Performance Baseline ​

Status: record (generated artifact, not a gate) Scope: wall-clock baselines for frontend stages, commands, VM workloads, the JS backend and the separate cross-language suite Environment: Linux x86_64 (4 CPU, 5 GiB RAM), rustc 1.98.1, Node v24.18.0, --release, shared runner (noisy — see MAD column) Recorded: 2026-09-20, cargo run --release -p aipo-bench (7 samples, median/MAD), git a8709881

These numbers are baselines for future comparison on a dedicated runner, not pass/fail thresholds. For the multi-runtime protocol, raw samples, checksums and fairness rules, see docs/performance/cross-language.md.

Frontend stages (median) ​

stage858 B9 KiB99 KiB1023 KiB
bytecode/compile+verify34.12µs347.30µs3.91ms45.94ms
formatter/format50.16µs561.38µs9.55ms78.44ms
hir/lower24.52µs224.03µs4.18ms41.71ms
ir/lower19.97µs239.95µs4.27ms39.82ms
lexer/tokenize24.13µs275.36µs5.36ms58.56ms
sema/check14.65µs105.30µs2.43ms24.32ms
source/new1.90µs15.45µs179.48µs2.23ms
syntax/parse77.95µs861.32µs11.42ms102.74ms

Commands and VM workloads (median) ​

workloadinputmedianMAD
cmd/check858 B188.04µs7.59µs
cmd/run858 B349.31µs6.43µs
cmd/build-emit858 B483.31µs4.75µs
cmd/fmt-check858 B94.61µs2.92µs
vm/int-arith43 B217.06µs1.62µs
vm/float-arith46 B206.48µs1.16µs
vm/call-overhead61 B223.84µs625ns
vm/recursion75 B13.79ms315.07µs
vm/closure-shared-var94 B274.68µs12.55µs
vm/global-lookup45 B218.07µs7.66µs
vm/list-build-iter74 B503.85µs33.07µs
vm/dict-insert-lookup78 B226.62µs2.02µs
vm/string-concat39 B477.75µs2.80µs
vm/interpolation43 B222.32µs2.16µs
vm/bytes-alloc49 B77.50µs611ns
vm/pipeline40 B142.71µs389ns
vm/failure-propagate112 B175.88µs180ns
vm/attempt68 B106.75µs262ns
vm/contracts71 B179.25µs1.07µs
vm/invariant-commit167 B212.84µs1.34µs

JS backend (frontend + emit + node spawn + run) ​

workloadinputmedianMAD
js/emit858 B288.64µs13.93µs
js/emit9 KiB4.00ms178.16µs
js/emit99 KiB57.60ms4.30ms
js/emit1023 KiB576.11ms16.64ms
js/hello17 B57.64ms5.16ms
js/integrated858 B72.06ms6.68ms

Node process spawn dominates small workloads (~50–70 ms total). A medição cross-language separa Aipo VM in-process, Aipo CLI/VM e Aipo→JavaScript; comparações de steady-state ainda exigem runner dedicado.

Scaling (list build/iterate, dict insert, N=200..1600) ​

All ratios near 2× per doubling on this runner — linear behavior; verdicts report noise honestly. Raw ratios:

  • list-build: N=200..1600 ratios [1.73x, 2.17x, 1.66x] verdict=noisy — rerun on dedicated runner
  • list-iterate: N=200..1600 ratios [1.88x, 2.07x, 1.86x] verdict=noisy — rerun on dedicated runner
  • dict-insert: N=200..1600 ratios [1.75x, 1.87x, 2.02x] verdict=noisy — rerun on dedicated runner

Notable finding during this gauntlet ​

Format-string parsing scaled 68× per 10× input (measured 23.4 ms for 400 f-strings over 8.4 KiB). Root cause: per-placeholder " ".repeat(offset) padding plus full rescans. Fixed by parsing slices unpadded and shifting spans back (crates/aipo-syntax/src/shift.rs, ADP-005 addendum): 1.77 ms after, offset-proportional cost eliminated, corpus snapshots byte-identical.