Benchmarks
The Benchmarks workflow runs sequentially on Ubuntu runners under headless luau 0.748 across both --codegen -O2 (matching Roblox native codegen) and -O2 interpreter execution. Before timing any workload, docs/benchmarks/bench.py runs --verify to confirm exact output parity against host Luau loadstring.
Results
Raw timing, cold-require, and code-footprint metrics are published alongside the SVG charts in results.json on the assets branch.
Capabilities
| Capability | Ouro | Fiu | LuauCeption (0.654) |
|---|---|---|---|
| Lexer & lossless AST | Yes (reconstruct(), :text(), :formatDiagnostics()) | No | C++/WASM only |
Luau 0.748 bytecode compiler (O0–O2) | Yes (pure Luau) | No | Luau 0.654 via WASM |
| Bytecode disassembler & verifier | Yes (v3–v14 verified, uniform (val?, err?)) | Deserializes only | C++/WASM only |
| Sandboxed register VM | Dual @native fast / guarded | Interpreter loop | WASM C VM (lua_State) |
| Safe-by-default presets & budgets | Built-in (Ouro.run, Ouro.sandbox, PRESETS, ResourceLimits) | Custom hooks only | Custom C setup |
Per-environment RNG & getGlobal/setGlobal | Built-in (PCG32, cross-sandbox debug/getfenv isolation) | Manual metatable env | Manual metatable env |
| Runtime architecture | Pure --!strict Luau | Pure Luau | Emscripten WASM in Luau |
What's Measured
Every run exercises four stages defined in docs/benchmarks/run.luau:
- Warm VM execution (
13workloads): Mixed loops and coroutines (vm-suite),100karithmetic (arith-100k), recursivefib(24)(fib-24),20kupvalue closures (closures-20k),5kmetatable method calls (tables-meta-5k),20kmath fastcalls (imports-20k),20kglobal reads and writes (globals-20k),2kthrowingpcallframes (pcall-2k),20kipairsscans (forin-gen-20k),2,000-element quicksort (quicksort-2k),10kstring formatting (string-ops-10k),10kselectvararg calls (varargs-10k), and20kdictionary field updates (table-dict-20k). - O2 compilation (
5corpora): Full source-to-O2bytecode timing acrosstiny-120B,runtime-10KiB,runtime-50KiB,runtime-250KiB, andtypes-50KiB(measuring Ouro's lexer, parser, compiler, and full compile against LuauCeption's WASM compiler), plus Ouro bytecodedeserializeandloadBytecodelatency across10–250 KiB. - Cold load + run (
cold-load-run): Fresh environment or VM state per invocation followed by a1karithmetic loop. - Cold root
require(cold-require): Subprocessrequirelatency comparing Ouro's lazy facade against eager competitor modules (Fiu/Source.luaandLuauCeption/Full.luau), plus Ouro's incremental lazy module loads (VM,Parser,Compiler).
Methodology
- Sampling: Warmed median (
p50) over7runs (5forfib-24andruntime-250KiB;9forcold-load-run;3subprocess samples forcold-require). Treat gaps under roughly10%as run-to-run microbenchmark variance. - Fair sandbox configuration: Ouro executes in its default isolated environment (
VM.createEnvironment()), withOuro (guarded)enforcinginstructionLimit = 50_000_000.Fiu (fast)configureserrorHandling = false,reuseClosures = true,vectorCtor = vector.create, and staticuseImportConstants = trueon all non-global workloads.LuauCeptionruns insideluaL_sandbox(L)on all non-global workloads. - Handling
pcall-2k: LuauCeption throwsInfinityin WASM C++ exception handling when guest errors unwind insidepcall(pcall-2k). Its bar renders asDNF (error)on the full charts, and its VM geometric mean averages the12completed workloads without adding an arbitrary timeout penalty. - Per-row normalization: Geometric means normalize each row to its fastest completed entry (
1.0×). Bars exceeding10×fade out cleanly and print the true multiple.
Reproducing
Run parity verification or the self-contained Ouro suite locally without third-party dependencies:
python3 docs/benchmarks/bench.py --verify
luau --codegen -O2 docs/benchmarks/run.luauOr run the sequential 3-way runner against pinned local copies of Fiu and LuauCeption to produce results.json and render chart-small.svg, chart.svg, and chart-interp.svg:
python3 docs/benchmarks/bench.py --verify --fiu /path/to/Fiu/Source.lua --luauception /path/to/luauception
python3 docs/benchmarks/bench.py --fiu /path/to/Fiu/Source.lua --luauception /path/to/luauception
python3 docs/benchmarks/chart.py