Performance And Benchmarks
Vela performance work is measurement-first. Correctness, budgets, GC roots, HostAccess routing, reflection policy, hot reload ownership, and diagnostics take priority over raw speed.
Benchmark Harnesses
Section titled “Benchmark Harnesses”Common benchmark commands are:
cargo bench -p vela_vm --bench baselinecargo bench -p vela_vm --bench baseline -- --quickcargo bench -p vela_vm --bench external_compare -- --quickcargo bench -p vela_engine --bench hot_reload -- --quickFilters are passed after --, for example:
cargo bench -p vela_vm --bench external_compare -- --quick stringExternal Comparison Modes
Section titled “External Comparison Modes”The mixed comparison harness reports runtime mode explicitly:
runtime=vela mode=internal_hot_loopruntime=lua54 mode=embedded_hot_loopruntime=rhai mode=embedded_hot_loopruntime=node mode=process_hot_loopruntime=python3 mode=process_hot_loopRows with different modes are directional comparisons, not one absolute fairness leaderboard.
Optimization Loop
Section titled “Optimization Loop”Accepted performance work should follow this loop:
capture baseline -> profile hotspot -> make one focused change ->capture candidate -> compare against baseline -> keep only with evidenceThe helper scripts under tools/perf/ retain raw key=value output and compare
candidate rows with checksum validation.
Durable Results
Section titled “Durable Results”Routine local captures belong under perf-results/. Small intentional
guardrails can live under perf-baselines/. Current benchmark rules and durable
baseline summaries are maintained in docs/performance.md.