Skip to content

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.

Common benchmark commands are:

Terminal window
cargo bench -p vela_vm --bench baseline
cargo bench -p vela_vm --bench baseline -- --quick
cargo bench -p vela_vm --bench external_compare -- --quick
cargo bench -p vela_engine --bench hot_reload -- --quick

Filters are passed after --, for example:

Terminal window
cargo bench -p vela_vm --bench external_compare -- --quick string

The mixed comparison harness reports runtime mode explicitly:

runtime=vela mode=internal_hot_loop
runtime=lua54 mode=embedded_hot_loop
runtime=rhai mode=embedded_hot_loop
runtime=node mode=process_hot_loop
runtime=python3 mode=process_hot_loop

Rows with different modes are directional comparisons, not one absolute fairness leaderboard.

Accepted performance work should follow this loop:

capture baseline -> profile hotspot -> make one focused change ->
capture candidate -> compare against baseline -> keep only with evidence

The helper scripts under tools/perf/ retain raw key=value output and compare candidate rows with checksum validation.

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.