Wax
View on GitHub

Wax's benchmark results

Written by wax-bench report (see bench/run.sh). The benchmarks are D57's, run by D58's rules: every benchmark in every kind, every number saying its kind, and every answer checked before its time counts.

Setup

  • Machine: Apple M5, 10 cores, 24 GB.
  • System: macOS 27.2.1 (27.2.0).
  • Wax: this repository, built by rustc 1.96.1 (31fca3adb 2026-06-26), release profile (optimised, link-time optimisation, one code unit).
  • Luau: 0.736.0, its interpreter, with native code generation off (the default of the luau command).
  • LuaJIT: LuaJIT 2.1.1787165859 -- Copyright (C) 2005-2026 Mike Pall. https://luajit.org/, with -joff (its interpreter alone, a bar for goal 1 by D142) and without (its JIT on, for reference). It runs the Luau programs as they are, which are plain Lua.
  • Node: v24.16.0, with --jitless (only Ignition, V8's bytecode interpreter) and without (V8's JITs on).
  • Java: openjdk version "26.0.2.1" 2026-08-18, with -Xint (HotSpot's bytecode interpreter alone) and without (its JITs on, warmed up 30 times), for reference. Each program is compiled by javac first, outside its timing.
  • Python: Python 3.14.7, with gmpy2 2.3.2 (on GMP), in target/bench-python, which bench/run.sh makes; Python's decimal is on libmpdec 4.0.1.
  • How busy the machine was (load averages over 1, 5 and 15 minutes): { 2.99 2.93 2.60 } before, { 2.45 2.77 2.63 } after. Other sessions were working on this machine during the run.
  • Runs: each row is one process; run is called once (the first run), twice more to warm up, then 10 times, timed. The warmed-up Node and Java rows warm up 30 times instead; the from-cold Node row not at all.
  • Peak memory is the whole process's, as the system reports it. Load is how long loading the script takes: inside the process for Wax (cold, then warm, when Wax reuses what it compiled for the same text), and as a whole process that starts, loads and stops for every engine.
  • Kinds: Purpose isolates one thing; Normal is written plainly; Ceil is tuned. Ceil.source runs the tuned program on the usual build. Ceil.machine builds Wax's VM for this exact CPU, Ceil.program builds it with a profile of the benchmarks' own run, and Ceil.machine.program does both; a script is never compiled for a CPU (D46), so those apply to the VM. Luau, LuaJIT, Node and Java are the installed builds in every kind.

D57's goals, judged Normal against Normal (D58)

GoalBenchmarkWaxAgainstVerdict
1. Faster than Luau's interpreterfib(32), recursive32.10 ms74.48 msmet: Wax takes 43% of its time
1. Faster than Luau's interpretern-body, 100,000 steps52.99 ms71.10 msmet: Wax takes 75% of its time
1. Faster than Luau's interpreterspectral-norm, size 20018.58 ms27.51 msmet: Wax takes 68% of its time
1. Faster than Luau's interpreterfannkuch-redux, 9100.62 ms211.75 msmet: Wax takes 48% of its time
1. Faster than Luau's interpreterword count, 500,000 words24.79 ms30.28 msmet: Wax takes 82% of its time
1. Faster than Luau's interpretertext building, 20,000 joins348.19 µs177.96 msmet: Wax takes 0.2% of its time
1. Faster than Luau's interpreterbinary-trees, depth 14101.00 ms143.69 msmet: Wax takes 70% of its time
1. Faster than Luau's interpreterpatrolling scripts, the whole run: loading 1000 from one text, resuming each 100 times2.37 ms3.61 msmet: Wax takes 66% of its time
1. Faster than Luau's interpreterpatrolling scripts, resuming each22 ns34 nsmet: Wax takes 64% of its time
1. Faster than Luau's interpreterpatrolling scripts, loading each from the same text189 ns196 nsmet: Wax takes 96% of its time
1. Faster than Luau's interpreterpatrolling scripts, loading each from a text of its own4.81 µs5.03 µsmet: Wax takes 96% of its time
1. Faster than LuaJIT's interpreterfib(32), recursive32.10 ms34.79 msmet: Wax takes 92% of its time
1. Faster than LuaJIT's interpretern-body, 100,000 steps52.99 ms74.44 msmet: Wax takes 71% of its time
1. Faster than LuaJIT's interpreterspectral-norm, size 20018.58 ms47.64 msmet: Wax takes 39% of its time
1. Faster than LuaJIT's interpreterfannkuch-redux, 9100.62 ms148.32 msmet: Wax takes 68% of its time
1. Faster than LuaJIT's interpreterword count, 500,000 words24.79 ms32.00 msmet: Wax takes 77% of its time
1. Faster than LuaJIT's interpretertext building, 20,000 joins348.19 µs43.27 msmet: Wax takes 0.8% of its time
1. Faster than LuaJIT's interpreterbinary-trees, depth 14101.00 ms128.37 msmet: Wax takes 79% of its time
1. Faster than LuaJIT's interpreterpatrolling scripts, the whole run: loading 1000 from one text, resuming each 100 times2.37 ms3.16 msmet: Wax takes 75% of its time
1. Faster than LuaJIT's interpreterpatrolling scripts, resuming each22 ns30 nsmet: Wax takes 73% of its time
1. Faster than LuaJIT's interpreterpatrolling scripts, loading each from the same text189 ns193 nsmet: Wax takes 98% of its time
1. Faster than LuaJIT's interpreterpatrolling scripts, loading each from a text of its own4.81 µs1.88 µsfor reference, no target (D150)
D171, D176. Within twice LuaJIT loading its own bytecodepatrolling scripts, loading each from a compiled file of its own604 ns331 nsmet: Wax takes 182% of its time
D176. Loading the same compiled file againpatrolling scripts, each loaded from one .waxc file, reusing what was verified135 nsfor reference, no target
D171. Checking a .waxc file's signature, once per filepatrolling scripts, loading each signed file of its own, signature checked41.33 µsfor reference, no target
D152. A door call through C as fast as a Rust door1,000,000 door calls from a loop15 nsa Rust door: 8 ns; LuaJIT's C API: 7 nsan aim, no target: 1.8× a Rust door's time
D155. Faster than Python's built-insHugeWhole: 3000 factorial, 9,131 digits1.58 ms1.61 msmet: Wax takes 98% of its time
D155. Faster than Python's built-insHugeWhole: an idle game's gold over 20,000 ticks, upgrades doubling it, 604 digits1.41 ms1.56 msmet: Wax takes 91% of its time
D155. Faster than Python's built-insDecimal: 1,000,000 prices summed with tax, then split three ways114.20 ms176.79 msmet: Wax takes 65% of its time
D155. Faster than Python's built-insDecimal: 1,000,000 days of interest compounding, a cent put in each day73.79 ms86.95 msmet: Wax takes 85% of its time
D155. Faster than Python's built-insHugeDecimal: 2,000 years of exact 5% interest, 4,048 digits452.99 µs942.22 µsmet: Wax takes 48% of its time
D155. Faster than Python's built-insHugeDecimal: the money sums, kept exactly97.57 ms165.46 msmet: Wax takes 59% of its time
2. Faster than V8 --jitlessfib(32), recursive32.10 ms93.36 msmet: Wax takes 34% of its time
2. Faster than V8 --jitlessn-body, 100,000 steps52.99 ms186.88 msmet: Wax takes 28% of its time
2. Within twice V8 --jitlessword count, 500,000 words24.79 ms52.71 msmet: Wax takes 47% of its time
2. Within twice V8 --jitlesstext building, 20,000 joins348.19 µs508.81 µsmet: Wax takes 68% of its time
6. Pausing costs about as much as a callpatrolling scriptsresume 22 nshost call 40 nsmet
5. Thousands of scripts, each costing kilobytespatrolling scripts512 B each, countedmet

Goal 3, full V8 with its JITs, has no target, nor has LuaJIT with its JIT (D142): their rows are in every table for reference. Loading a script from a text of its own is judged against Luau's interpreter alone, with LuaJIT's shown beside it (D150). Goal 7 holds for every number here: every check was on, except in the table that measures what the checks cost.

Java's interpreter, for reference, Normal against Normal

HotSpot's bytecode interpreter alone (java -Xint), each program compiled by javac before it runs, with Luau's interpreter beside it. No goal is set against Java; these are measured only.

BenchmarkWaxJava -XintLuau (interpreter)Wax's share of Java's time
fib(32), recursive32.10 ms92.37 ms74.48 ms35%
n-body, 100,000 steps52.99 ms63.24 ms71.10 ms84%
spectral-norm, size 20018.58 ms27.76 ms27.51 ms67%
fannkuch-redux, 9100.62 ms124.77 ms211.75 ms81%
word count, 500,000 words24.79 ms840.43 ms30.28 ms3.0%
text building, 20,000 joins348.19 µs116.61 ms177.96 ms0.3%
binary-trees, depth 14101.00 ms159.48 ms143.69 ms63%

The speed job of 2026-11-29: six rows before and after

Means of whole processes, each row's own kind, before at 4dbe735 and after at 2cd351c, with Luau's interpreter (and for n-body, Java's) beside them as yardsticks, not goals. Every check is kept, and every result is the same.

RowKindBeforeAfterLuau's interpreter nowWhat changed
word count: a Dict with text keysPurpose125.14 ms60.00 ms62.39 mshashes built without memory copies, kept with their text; a read-then-set looked up once
a host calling a script's procedureNormal, call each41 ns40 ns18 nsthe last call's stack reused; see below
loading from a text of its ownPurpose58.95 µs76.72 µs (±28.68)13.26 µsnone: it's a fresh process's first load, mostly mapping in code; see below
a loop over a list of floatsPurpose55.13 ms13.75 ms46.25 msa loop that only adds each item into a total is one instruction
reversing a short list in placePurpose85.40 ms81.81 ms88.57 msa plain value set with no copy first
reaching a list item's fields (n-body)Normal64.78 ms52.99 ms71.10 ms (Java's 63.24)fields copied with plain stores, not the system's memory copy

A host's call stays above Luau's: Luau's row is one Lua function calling another, since its driver is written in Lua, where Wax's is a Rust host calling into a script, which starts a task, checks each argument's type, guards against a bug in Wax and converts the result back. Loading Purpose is the first script a fresh process loads: about 65 page faults as the system maps in Wax's code, which a linker order file in each host's own build would address.

fib(32), recursive

Tests: calls. Purpose isolates calls alone: a procedure calling itself 1,000 deep, 20,000 times.

EngineKindMeanDeviationLeastFirst runPeak memoryProgramLoadNotes
WaxPurpose85.41 ms1.22 ms84.35 ms102.36 ms3.0 MB377 B849.96 µs cold, 375 ns warm; 2.89 ms as a whole process32.0 KB counted by Wax; 176 B compiled
Luau (interpreter)Purpose201.86 ms3.47 ms197.63 ms215.47 ms4.8 MB339 B5.69 ms as a whole process
LuaJIT -joffPurpose91.37 ms1.13 ms89.08 ms91.96 ms1.9 MB339 B2.41 ms as a whole process
LuaJIT (JIT)Purpose44.27 ms174.16 µs44.03 ms46.55 ms2.3 MB339 B2.41 ms as a whole process
Node --jitlessPurpose335.13 ms15.51 ms324.68 ms327.26 ms43.5 MB362 B19.82 ms as a whole process
Node (JIT), from coldPurpose127.77 ms1.11 ms126.69 ms129.45 ms49.2 MB362 B20.22 ms as a whole process
Node (JIT), warmed upPurpose127.74 ms1.80 ms125.53 ms127.01 ms49.4 MB362 B20.02 ms as a whole process
Java -XintPurpose208.04 ms3.92 ms201.76 ms204.08 ms38.7 MB373 B18.57 ms as a whole process
Java (JIT), warmed upPurpose44.38 ms1.01 ms43.31 ms49.07 ms42.1 MB373 B22.11 ms as a whole process
WaxNormal32.10 ms847.19 µs31.19 ms34.94 ms3.0 MB169 B90.83 µs cold, 333 ns warm; 2.56 ms as a whole process2.0 KB counted by Wax; 88 B compiled
Luau (interpreter)Normal74.48 ms2.01 ms72.69 ms75.10 ms4.8 MB143 B5.50 ms as a whole process
LuaJIT -joffNormal34.79 ms853.49 µs33.97 ms34.62 ms1.9 MB143 B2.55 ms as a whole process
LuaJIT (JIT)Normal7.15 ms109.65 µs7.04 ms7.57 ms2.2 MB143 B2.49 ms as a whole process
Node --jitlessNormal93.36 ms821.67 µs91.97 ms96.22 ms43.5 MB137 B18.78 ms as a whole process
Node (JIT), from coldNormal9.59 ms474.19 µs9.39 ms10.88 ms48.7 MB137 B19.18 ms as a whole process
Node (JIT), warmed upNormal9.56 ms43.84 µs9.51 ms10.02 ms48.8 MB137 B19.34 ms as a whole process
Java -XintNormal92.37 ms349.12 µs91.98 ms94.47 ms38.4 MB153 B17.28 ms as a whole process
Java (JIT), warmed upNormal2.97 ms58.64 µs2.91 ms3.22 ms42.0 MB153 B17.72 ms as a whole process
WaxCeil.source31.24 ms476.47 µs30.44 ms30.26 ms3.0 MB169 B87.08 µs cold, 208 ns warm; 2.88 ms as a whole process2.0 KB counted by Wax; 88 B compiled; the Normal program stands in
WaxCeil.machine33.66 ms1.65 ms31.56 ms51.12 ms2.9 MB169 B1.09 ms cold, 625 ns warm; 2.93 ms as a whole process2.0 KB counted by Wax; 88 B compiled; the Normal program stands in
WaxCeil.program29.03 ms458.62 µs28.50 ms42.71 ms2.6 MB169 B846.38 µs cold, 1.12 µs warm; 2.90 ms as a whole process2.0 KB counted by Wax; 88 B compiled; the Normal program stands in
WaxCeil.machine.program30.81 ms104.52 µs30.63 ms51.22 ms2.7 MB169 B773.12 µs cold, 417 ns warm; 2.62 ms as a whole process2.0 KB counted by Wax; 88 B compiled; the Normal program stands in
Luau (interpreter)Ceil.source73.34 ms893.57 µs72.10 ms71.87 ms4.9 MB143 B5.26 ms as a whole processthe Normal program stands in
LuaJIT -joffCeil.source34.08 ms75.44 µs33.98 ms33.85 ms1.9 MB143 B2.37 ms as a whole processthe Normal program stands in
LuaJIT (JIT)Ceil.source7.12 ms22.33 µs7.09 ms7.35 ms2.2 MB143 B2.38 ms as a whole processthe Normal program stands in
Node --jitlessCeil.source98.43 ms5.45 ms94.02 ms95.85 ms43.5 MB137 B19.89 ms as a whole processthe Normal program stands in
Node (JIT), from coldCeil.source9.75 ms217.22 µs9.56 ms10.30 ms48.7 MB137 B19.83 ms as a whole processthe Normal program stands in
Node (JIT), warmed upCeil.source9.72 ms77.44 µs9.63 ms11.32 ms48.7 MB137 B20.94 ms as a whole processthe Normal program stands in
Java -XintCeil.source88.22 ms1.71 ms86.27 ms88.03 ms38.5 MB153 B18.84 ms as a whole processthe Normal program stands in
Java (JIT), warmed upCeil.source2.91 ms96.07 µs2.84 ms3.11 ms41.9 MB153 B18.84 ms as a whole processthe Normal program stands in

n-body, 100,000 steps

Tests: float maths, records. Purpose isolates float maths on one record's fields, 5,000,000 times, with nothing called or allocated.

EngineKindMeanDeviationLeastFirst runPeak memoryProgramLoadNotes
WaxPurpose50.73 ms599.26 µs50.00 ms52.15 ms2.9 MB532 B182.00 µs cold, 250 ns warm; 2.62 ms as a whole process512 B counted by Wax; 232 B compiled
Luau (interpreter)Purpose92.87 ms633.14 µs92.00 ms93.16 ms4.8 MB433 B5.42 ms as a whole process
LuaJIT -joffPurpose77.06 ms273.30 µs76.62 ms76.17 ms1.9 MB433 B2.57 ms as a whole process
LuaJIT (JIT)Purpose6.79 ms34.57 µs6.76 ms6.87 ms2.1 MB433 B2.48 ms as a whole process
Node --jitlessPurpose246.50 ms1.79 ms243.98 ms245.56 ms46.7 MB460 B20.22 ms as a whole process
Node (JIT), from coldPurpose19.19 ms157.69 µs18.96 ms19.23 ms50.3 MB460 B19.36 ms as a whole process
Node (JIT), warmed upPurpose19.19 ms286.45 µs18.86 ms19.24 ms50.4 MB460 B19.88 ms as a whole process
Java -XintPurpose99.06 ms1.15 ms97.55 ms98.12 ms38.5 MB522 B17.56 ms as a whole process
Java (JIT), warmed upPurpose6.28 ms200.67 µs5.95 ms17.05 ms41.9 MB522 B18.11 ms as a whole process
WaxNormal52.99 ms381.50 µs52.51 ms54.12 ms3.5 MB3.4 KB297.92 µs cold, 333 ns warm; 2.88 ms as a whole process2.0 KB counted by Wax; 1.8 KB compiled
Luau (interpreter)Normal71.10 ms1.25 ms70.17 ms70.74 ms4.9 MB3.0 KB5.69 ms as a whole process
LuaJIT -joffNormal74.44 ms1.05 ms72.38 ms73.55 ms1.9 MB3.0 KB2.96 ms as a whole process
LuaJIT (JIT)Normal5.46 ms86.32 µs5.36 ms5.79 ms2.2 MB3.0 KB2.80 ms as a whole process
Node --jitlessNormal186.88 ms8.50 ms176.39 ms192.80 ms48.3 MB3.1 KB19.84 ms as a whole process
Node (JIT), from coldNormal3.94 ms78.05 µs3.86 ms5.87 ms52.0 MB3.1 KB19.79 ms as a whole process
Node (JIT), warmed upNormal3.90 ms24.58 µs3.85 ms5.95 ms52.1 MB3.1 KB19.35 ms as a whole process
Java -XintNormal63.24 ms1.43 ms61.67 ms62.71 ms38.5 MB3.4 KB17.93 ms as a whole process
Java (JIT), warmed upNormal5.76 ms2.25 ms3.59 ms9.14 ms43.6 MB3.4 KB20.79 ms as a whole process
WaxCeil.source47.22 ms783.99 µs46.34 ms50.77 ms3.4 MB3.4 KB271.83 µs cold, 375 ns warm; 2.93 ms as a whole process2.0 KB counted by Wax; 1.8 KB compiled
WaxCeil.machine48.47 ms853.89 µs47.47 ms48.53 ms3.4 MB3.4 KB305.04 µs cold, 292 ns warm; 3.03 ms as a whole process2.0 KB counted by Wax; 1.8 KB compiled
WaxCeil.program41.02 ms302.70 µs40.58 ms40.96 ms3.1 MB3.4 KB264.00 µs cold, 250 ns warm; 2.94 ms as a whole process2.0 KB counted by Wax; 1.8 KB compiled
WaxCeil.machine.program42.02 ms171.87 µs41.81 ms42.33 ms3.1 MB3.4 KB283.04 µs cold, 208 ns warm; 3.08 ms as a whole process2.0 KB counted by Wax; 1.8 KB compiled
Luau (interpreter)Ceil.source69.44 ms190.04 µs69.21 ms69.44 ms4.8 MB3.0 KB5.61 ms as a whole processthe Normal program stands in
LuaJIT -joffCeil.source72.55 ms501.40 µs71.91 ms71.12 ms1.9 MB3.0 KB2.65 ms as a whole processthe Normal program stands in
LuaJIT (JIT)Ceil.source5.23 ms33.39 µs5.17 ms5.45 ms2.2 MB3.0 KB2.44 ms as a whole processthe Normal program stands in
Node --jitlessCeil.source179.12 ms3.85 ms174.69 ms183.21 ms48.2 MB3.1 KB19.65 ms as a whole processthe Normal program stands in
Node (JIT), from coldCeil.source4.00 ms149.56 µs3.90 ms6.67 ms52.2 MB3.1 KB20.07 ms as a whole processthe Normal program stands in
Node (JIT), warmed upCeil.source3.94 ms27.68 µs3.90 ms5.86 ms52.0 MB3.1 KB20.65 ms as a whole processthe Normal program stands in
Java -XintCeil.source64.09 ms2.88 ms61.59 ms68.18 ms38.4 MB3.4 KB18.64 ms as a whole processthe Normal program stands in
Java (JIT), warmed upCeil.source3.49 ms64.22 µs3.42 ms6.77 ms43.7 MB3.4 KB18.49 ms as a whole processthe Normal program stands in

spectral-norm, size 200

Tests: loops, arrays, floats. Purpose isolates a loop over a list of 1,000 floats, 20,000 times.

EngineKindMeanDeviationLeastFirst runPeak memoryProgramLoadNotes
WaxPurpose13.75 ms57.81 µs13.67 ms13.75 ms3.1 MB393 B110.71 µs cold, 250 ns warm; 2.85 ms as a whole process8.5 KB counted by Wax; 216 B compiled
Luau (interpreter)Purpose46.25 ms2.25 ms44.99 ms45.23 ms4.8 MB366 B5.09 ms as a whole process
LuaJIT -joffPurpose77.51 ms92.15 µs77.32 ms77.49 ms2.0 MB366 B2.54 ms as a whole process
LuaJIT (JIT)Purpose23.17 ms118.48 µs23.02 ms23.51 ms2.2 MB366 B2.50 ms as a whole process
Node --jitlessPurpose371.39 ms8.60 ms362.69 ms383.84 ms48.8 MB398 B18.62 ms as a whole process
Node (JIT), from coldPurpose34.31 ms36.36 ms15.62 ms21.15 ms52.9 MB398 B19.23 ms as a whole process
Node (JIT), warmed upPurpose14.74 ms275.67 µs14.36 ms18.61 ms55.5 MB398 B19.49 ms as a whole process
Java -XintPurpose77.00 ms4.10 ms74.76 ms76.26 ms38.6 MB426 B18.17 ms as a whole process
Java (JIT), warmed upPurpose9.81 ms155.43 µs9.63 ms12.44 ms42.4 MB426 B18.40 ms as a whole process
WaxNormal18.58 ms97.48 µs18.43 ms18.06 ms3.2 MB1.2 KB151.62 µs cold, 292 ns warm; 2.58 ms as a whole process9.2 KB counted by Wax; 992 B compiled
Luau (interpreter)Normal27.51 ms341.75 µs27.00 ms28.06 ms4.9 MB981 B5.19 ms as a whole process
LuaJIT -joffNormal47.64 ms892.49 µs45.96 ms46.09 ms2.0 MB981 B2.62 ms as a whole process
LuaJIT (JIT)Normal1.53 ms18.60 µs1.52 ms1.69 ms2.3 MB981 B2.50 ms as a whole process
Node --jitlessNormal64.47 ms242.37 µs64.15 ms64.08 ms48.5 MB1.0 KB19.33 ms as a whole process
Node (JIT), from coldNormal1.61 ms178.13 µs1.49 ms3.25 ms53.0 MB1.0 KB19.18 ms as a whole process
Node (JIT), warmed upNormal1.67 ms12.87 µs1.65 ms3.24 ms53.0 MB1.0 KB19.86 ms as a whole process
Java -XintNormal27.76 ms337.14 µs27.18 ms27.20 ms39.3 MB1.1 KB17.96 ms as a whole process
Java (JIT), warmed upNormal684.08 µs53.21 µs658.12 µs4.47 ms44.7 MB1.1 KB18.35 ms as a whole process
WaxCeil.source18.25 ms269.57 µs17.92 ms18.34 ms3.2 MB1.2 KB151.96 µs cold, 292 ns warm; 2.84 ms as a whole process9.2 KB counted by Wax; 992 B compiled; the Normal program stands in
WaxCeil.machine17.99 ms470.97 µs17.50 ms18.03 ms3.2 MB1.2 KB152.17 µs cold, 208 ns warm; 2.74 ms as a whole process9.2 KB counted by Wax; 992 B compiled; the Normal program stands in
WaxCeil.program19.17 ms326.98 µs18.77 ms18.89 ms2.9 MB1.2 KB131.75 µs cold, 208 ns warm; 2.82 ms as a whole process9.2 KB counted by Wax; 992 B compiled; the Normal program stands in
WaxCeil.machine.program20.37 ms135.34 µs20.16 ms20.73 ms3.0 MB1.2 KB138.50 µs cold, 250 ns warm; 2.67 ms as a whole process9.2 KB counted by Wax; 992 B compiled; the Normal program stands in
Luau (interpreter)Ceil.source37.33 ms677.52 µs36.28 ms31.05 ms4.8 MB981 B5.29 ms as a whole processthe Normal program stands in
LuaJIT -joffCeil.source47.05 ms781.64 µs46.08 ms45.93 ms2.0 MB981 B2.37 ms as a whole processthe Normal program stands in
LuaJIT (JIT)Ceil.source1.56 ms39.16 µs1.51 ms1.70 ms2.3 MB981 B2.35 ms as a whole processthe Normal program stands in
Node --jitlessCeil.source64.32 ms458.00 µs63.77 ms64.87 ms48.5 MB1.0 KB19.16 ms as a whole processthe Normal program stands in
Node (JIT), from coldCeil.source1.61 ms197.29 µs1.49 ms3.67 ms53.0 MB1.0 KB19.18 ms as a whole processthe Normal program stands in
Node (JIT), warmed upCeil.source1.66 ms51.92 µs1.62 ms3.36 ms52.9 MB1.0 KB19.29 ms as a whole processthe Normal program stands in
Java -XintCeil.source26.48 ms231.30 µs26.06 ms26.25 ms39.4 MB1.1 KB17.95 ms as a whole processthe Normal program stands in
Java (JIT), warmed upCeil.source689.92 µs45.95 µs656.71 µs4.51 ms44.8 MB1.1 KB18.16 ms as a whole processthe Normal program stands in

fannkuch-redux, 9

Tests: array shuffling, Whole maths. Purpose isolates reversing a list of 16 whole numbers in place, 1,000,000 times.

EngineKindMeanDeviationLeastFirst runPeak memoryProgramLoadNotes
WaxPurpose81.81 ms515.08 µs80.78 ms82.93 ms3.0 MB596 B109.21 µs cold, 333 ns warm; 2.80 ms as a whole process688 B counted by Wax; 280 B compiled
Luau (interpreter)Purpose88.57 ms1.10 ms87.26 ms87.96 ms4.8 MB523 B5.34 ms as a whole process
LuaJIT -joffPurpose53.07 ms505.36 µs52.40 ms50.82 ms1.9 MB523 B2.53 ms as a whole process
LuaJIT (JIT)Purpose6.18 ms33.42 µs6.15 ms6.31 ms2.2 MB523 B2.23 ms as a whole process
Node --jitlessPurpose146.04 ms545.95 µs145.12 ms150.17 ms43.5 MB568 B19.48 ms as a whole process
Node (JIT), from coldPurpose3.70 ms102.04 µs3.62 ms4.49 ms49.5 MB568 B19.56 ms as a whole process
Node (JIT), warmed upPurpose3.78 ms156.57 µs3.63 ms4.45 ms49.4 MB568 B20.41 ms as a whole process
Java -XintPurpose86.28 ms601.57 µs85.45 ms85.01 ms38.5 MB578 B18.32 ms as a whole process
Java (JIT), warmed upPurpose3.47 ms49.84 µs3.41 ms5.82 ms42.0 MB578 B18.69 ms as a whole process
WaxNormal100.62 ms567.20 µs99.85 ms101.97 ms3.2 MB1.8 KB166.08 µs cold, 458 ns warm; 2.87 ms as a whole process984 B counted by Wax; 664 B compiled
Luau (interpreter)Normal211.75 ms1.30 ms210.06 ms213.40 ms4.8 MB1.7 KB5.38 ms as a whole process
LuaJIT -joffNormal148.32 ms942.01 µs146.99 ms146.67 ms2.0 MB1.7 KB2.54 ms as a whole process
LuaJIT (JIT)Normal47.91 ms314.88 µs47.38 ms48.41 ms2.3 MB1.7 KB2.51 ms as a whole process
Node --jitlessNormal158.86 ms847.01 µs157.76 ms157.20 ms45.5 MB1.7 KB19.60 ms as a whole process
Node (JIT), from coldNormal14.96 ms81.22 µs14.82 ms16.38 ms52.2 MB1.7 KB19.38 ms as a whole process
Node (JIT), warmed upNormal14.18 ms85.57 µs14.02 ms15.83 ms52.3 MB1.7 KB19.36 ms as a whole process
Java -XintNormal124.77 ms351.20 µs124.09 ms126.62 ms51.3 MB1.7 KB17.81 ms as a whole process
Java (JIT), warmed upNormal12.81 ms214.82 µs12.48 ms19.58 ms82.4 MB1.7 KB18.40 ms as a whole process
WaxCeil.source100.67 ms181.51 µs100.31 ms102.49 ms3.2 MB1.8 KB168.79 µs cold, 291 ns warm; 2.66 ms as a whole process984 B counted by Wax; 664 B compiled; the Normal program stands in
WaxCeil.machine102.25 ms616.83 µs100.93 ms103.17 ms3.2 MB1.8 KB159.46 µs cold, 333 ns warm; 2.76 ms as a whole process984 B counted by Wax; 664 B compiled; the Normal program stands in
WaxCeil.program98.23 ms230.39 µs97.97 ms98.39 ms2.9 MB1.8 KB141.83 µs cold, 208 ns warm; 2.63 ms as a whole process984 B counted by Wax; 664 B compiled; the Normal program stands in
WaxCeil.machine.program103.47 ms240.77 µs103.05 ms104.15 ms3.0 MB1.8 KB131.75 µs cold, 250 ns warm; 2.62 ms as a whole process984 B counted by Wax; 664 B compiled; the Normal program stands in
Luau (interpreter)Ceil.source210.35 ms1.99 ms204.82 ms212.95 ms4.8 MB1.7 KB5.20 ms as a whole processthe Normal program stands in
LuaJIT -joffCeil.source146.74 ms483.33 µs146.08 ms145.50 ms2.0 MB1.7 KB2.52 ms as a whole processthe Normal program stands in
LuaJIT (JIT)Ceil.source48.84 ms305.95 µs48.30 ms48.40 ms2.3 MB1.7 KB2.48 ms as a whole processthe Normal program stands in
Node --jitlessCeil.source155.87 ms664.31 µs154.77 ms157.63 ms45.5 MB1.7 KB19.51 ms as a whole processthe Normal program stands in
Node (JIT), from coldCeil.source14.17 ms82.52 µs14.10 ms15.73 ms52.2 MB1.7 KB19.11 ms as a whole processthe Normal program stands in
Node (JIT), warmed upCeil.source14.74 ms110.09 µs14.56 ms16.39 ms52.3 MB1.7 KB19.71 ms as a whole processthe Normal program stands in
Java -XintCeil.source123.11 ms483.89 µs122.46 ms126.01 ms51.2 MB1.7 KB16.95 ms as a whole processthe Normal program stands in
Java (JIT), warmed upCeil.source12.77 ms183.75 µs12.41 ms18.59 ms82.0 MB1.7 KB17.92 ms as a whole processthe Normal program stands in

word count, 500,000 words

Tests: Dict and Text. Purpose isolates looking up and counting 1,000 text keys in a Dict, 5,000 times.

EngineKindMeanDeviationLeastFirst runPeak memoryProgramLoadNotes
WaxPurpose60.00 ms193.01 µs59.52 ms60.70 ms4.4 MB533 B113.67 µs cold, 500 ns warm; 2.51 ms as a whole process793.6 KB counted by Wax; 328 B compiled
Luau (interpreter)Purpose62.39 ms197.25 µs62.15 ms62.56 ms4.8 MB540 B5.18 ms as a whole process
LuaJIT -joffPurpose29.53 ms149.64 µs29.25 ms30.58 ms2.2 MB540 B2.48 ms as a whole process
LuaJIT (JIT)Purpose5.27 ms224.59 µs5.06 ms5.20 ms2.4 MB540 B3.18 ms as a whole process
Node --jitlessPurpose239.34 ms1.52 ms237.47 ms252.52 ms48.8 MB514 B18.68 ms as a whole process
Node (JIT), from coldPurpose87.63 ms25.03 ms65.40 ms91.04 ms52.8 MB514 B18.79 ms as a whole process
Node (JIT), warmed upPurpose66.11 ms417.98 µs65.70 ms88.47 ms52.6 MB514 B19.29 ms as a whole process
Java -XintPurpose1946.28 ms6.97 ms1933.40 ms1960.23 ms53.8 MB588 B16.93 ms as a whole process
Java (JIT), warmed upPurpose35.89 ms586.64 µs35.13 ms63.57 ms156.8 MB588 B17.33 ms as a whole process
WaxNormal24.79 ms60.02 µs24.72 ms24.76 ms4.2 MB538 B129.38 µs cold, 417 ns warm; 2.64 ms as a whole process625.5 KB counted by Wax; 288 B compiled
Luau (interpreter)Normal30.28 ms108.68 µs30.13 ms30.18 ms6.0 MB478 B4.98 ms as a whole process
LuaJIT -joffNormal32.00 ms501.99 µs31.05 ms29.46 ms3.0 MB478 B2.41 ms as a whole process
LuaJIT (JIT)Normal12.21 ms636.24 µs11.30 ms13.10 ms3.4 MB478 B2.34 ms as a whole process
Node --jitlessNormal52.71 ms361.15 µs52.37 ms54.11 ms56.6 MB477 B18.67 ms as a whole process
Node (JIT), from coldNormal35.52 ms374.90 µs35.11 ms36.12 ms62.5 MB477 B20.55 ms as a whole process
Node (JIT), warmed upNormal35.23 ms242.52 µs34.94 ms36.91 ms88.5 MB477 B19.07 ms as a whole process
Java -XintNormal840.43 ms35.83 ms807.67 ms817.50 ms54.2 MB527 B17.67 ms as a whole process
Java (JIT), warmed upNormal14.93 ms268.92 µs14.50 ms37.03 ms159.5 MB527 B19.51 ms as a whole process
WaxCeil.source25.89 ms631.71 µs25.29 ms28.75 ms4.2 MB538 B113.88 µs cold, 458 ns warm; 2.91 ms as a whole process625.5 KB counted by Wax; 288 B compiled; the Normal program stands in
WaxCeil.machine25.67 ms413.35 µs25.14 ms27.12 ms4.5 MB538 B120.42 µs cold, 334 ns warm; 3.03 ms as a whole process625.5 KB counted by Wax; 288 B compiled; the Normal program stands in
WaxCeil.program23.72 ms436.54 µs23.24 ms24.77 ms4.3 MB538 B118.67 µs cold, 250 ns warm; 2.85 ms as a whole process625.5 KB counted by Wax; 288 B compiled; the Normal program stands in
WaxCeil.machine.program22.91 ms58.19 µs22.79 ms23.32 ms4.0 MB538 B96.42 µs cold, 250 ns warm; 2.68 ms as a whole process625.5 KB counted by Wax; 288 B compiled; the Normal program stands in
Luau (interpreter)Ceil.source30.23 ms110.52 µs30.07 ms29.66 ms6.0 MB478 B5.30 ms as a whole processthe Normal program stands in
LuaJIT -joffCeil.source31.44 ms746.22 µs30.41 ms30.55 ms3.0 MB478 B2.60 ms as a whole processthe Normal program stands in
LuaJIT (JIT)Ceil.source12.70 ms1.21 ms11.00 ms12.69 ms3.4 MB478 B2.61 ms as a whole processthe Normal program stands in
Node --jitlessCeil.source53.60 ms547.52 µs52.70 ms54.65 ms56.6 MB477 B19.92 ms as a whole processthe Normal program stands in
Node (JIT), from coldCeil.source36.33 ms504.79 µs35.74 ms37.76 ms62.5 MB477 B21.36 ms as a whole processthe Normal program stands in
Node (JIT), warmed upCeil.source37.16 ms1.06 ms35.45 ms37.51 ms88.7 MB477 B19.78 ms as a whole processthe Normal program stands in
Java -XintCeil.source853.77 ms29.92 ms810.11 ms840.38 ms51.6 MB527 B18.16 ms as a whole processthe Normal program stands in
Java (JIT), warmed upCeil.source15.57 ms367.96 µs15.04 ms35.44 ms159.3 MB527 B19.94 ms as a whole processthe Normal program stands in

text building, 20,000 joins

Tests: joining text many times. Purpose isolates one text growing by two characters, 30,000 times.

EngineKindMeanDeviationLeastFirst runPeak memoryProgramLoadNotes
WaxPurpose311.82 µs13.62 µs300.75 µs331.42 µs3.2 MB215 B84.62 µs cold, 417 ns warm; 2.84 ms as a whole process64.6 KB counted by Wax; 96 B compiled
Luau (interpreter)Purpose155.26 ms12.87 ms145.34 ms148.83 ms11.2 MB195 B5.83 ms as a whole process
LuaJIT -joffPurpose32.80 ms500.29 µs32.34 ms32.56 ms3.7 MB195 B2.59 ms as a whole process
LuaJIT (JIT)Purpose21.64 ms433.17 µs20.84 ms20.93 ms3.8 MB195 B2.82 ms as a whole process
Node --jitlessPurpose410.80 µs161.03 µs248.21 µs1.08 ms52.7 MB223 B20.93 ms as a whole process
Node (JIT), from coldPurpose214.43 µs151.15 µs82.71 µs889.33 µs57.8 MB223 B19.22 ms as a whole process
Node (JIT), warmed upPurpose148.77 µs121.26 µs69.79 µs940.71 µs57.9 MB223 B19.03 ms as a whole process
Java -XintPurpose104.08 ms2.96 ms102.46 ms124.69 ms398.8 MB234 B17.89 ms as a whole process
Java (JIT), warmed upPurpose26.43 ms246.34 µs26.10 ms52.24 ms1 GB234 B18.32 ms as a whole process
WaxNormal348.19 µs7.41 µs341.58 µs366.50 µs3.4 MB182 B96.21 µs cold, 458 ns warm; 2.68 ms as a whole process128.6 KB counted by Wax; 80 B compiled
Luau (interpreter)Normal177.96 ms20.13 ms165.61 ms165.57 ms12.8 MB138 B5.10 ms as a whole process
LuaJIT -joffNormal43.27 ms329.59 µs42.60 ms43.20 ms5.2 MB138 B2.55 ms as a whole process
LuaJIT (JIT)Normal20.17 ms282.35 µs19.67 ms24.15 ms5.4 MB138 B2.49 ms as a whole process
Node --jitlessNormal508.81 µs347.49 µs277.42 µs1.34 ms61.6 MB155 B19.22 ms as a whole process
Node (JIT), from coldNormal499.18 µs485.64 µs112.08 µs1.49 ms65.2 MB155 B19.09 ms as a whole process
Node (JIT), warmed upNormal286.07 µs319.09 µs124.71 µs1.05 ms69.3 MB155 B19.56 ms as a whole process
Java -XintNormal116.61 ms1.71 ms114.71 ms135.59 ms399.1 MB169 B17.83 ms as a whole process
Java (JIT), warmed upNormal33.65 ms2.05 ms32.40 ms57.19 ms1 GB169 B18.05 ms as a whole process
WaxCeil.source356.09 µs8.23 µs344.88 µs384.12 µs3.5 MB182 B94.12 µs cold, 333 ns warm; 2.96 ms as a whole process128.6 KB counted by Wax; 80 B compiled; the Normal program stands in
WaxCeil.machine357.10 µs9.80 µs347.88 µs408.00 µs3.4 MB182 B2.13 ms cold, 750 ns warm; 2.79 ms as a whole process128.6 KB counted by Wax; 80 B compiled; the Normal program stands in
WaxCeil.program295.67 µs7.77 µs287.79 µs511.79 µs3.2 MB182 B1.95 ms cold, 750 ns warm; 2.86 ms as a whole process128.6 KB counted by Wax; 80 B compiled; the Normal program stands in
WaxCeil.machine.program295.51 µs6.11 µs286.25 µs478.25 µs3.2 MB182 B1.83 ms cold, 1.04 µs warm; 2.74 ms as a whole process128.6 KB counted by Wax; 80 B compiled; the Normal program stands in
Luau (interpreter)Ceil.source177.21 ms37.56 ms164.26 ms167.62 ms12.8 MB138 B4.98 ms as a whole processthe Normal program stands in
LuaJIT -joffCeil.source42.73 ms815.57 µs42.20 ms42.03 ms4.9 MB138 B4.35 ms as a whole processthe Normal program stands in
LuaJIT (JIT)Ceil.source22.39 ms7.52 ms19.73 ms28.25 ms5.2 MB138 B2.44 ms as a whole processthe Normal program stands in
Node --jitlessCeil.source499.08 µs334.35 µs266.17 µs1.10 ms61.7 MB155 B19.19 ms as a whole processthe Normal program stands in
Node (JIT), from coldCeil.source492.13 µs474.31 µs125.25 µs1.02 ms65.4 MB155 B18.89 ms as a whole processthe Normal program stands in
Node (JIT), warmed upCeil.source257.99 µs321.49 µs106.08 µs1.05 ms69.4 MB155 B18.99 ms as a whole processthe Normal program stands in
Java -XintCeil.source13.82 ms4.48 ms11.03 ms17.92 ms42.5 MB322 B17.00 ms as a whole process
Java (JIT), warmed upCeil.source108.99 µs67.88 µs82.62 µs1.50 ms53.8 MB322 B17.41 ms as a whole process

binary-trees, depth 14

Tests: making and dropping heap values (joined by D72). Purpose isolates making and dropping a tree 10 deep, 2,000 times, never reading it.

EngineKindMeanDeviationLeastFirst runPeak memoryProgramLoadNotes
WaxPurpose72.57 ms1.11 ms71.28 ms75.77 ms3.2 MB519 B109.12 µs cold, 333 ns warm; 2.63 ms as a whole process65.9 KB counted by Wax; 216 B compiled
Luau (interpreter)Purpose108.89 ms15.10 ms95.12 ms95.77 ms4.8 MB411 B5.19 ms as a whole process
LuaJIT -joffPurpose120.84 ms3.28 ms116.61 ms118.83 ms2.6 MB411 B2.49 ms as a whole process
LuaJIT (JIT)Purpose99.65 ms11.24 ms93.99 ms94.69 ms2.9 MB411 B4.02 ms as a whole process
Node --jitlessPurpose76.85 ms407.74 µs75.98 ms80.64 ms59.8 MB444 B18.80 ms as a whole process
Node (JIT), from coldPurpose10.50 ms275.12 µs10.27 ms13.00 ms65.8 MB444 B18.78 ms as a whole process
Node (JIT), warmed upPurpose10.47 ms621.99 µs10.11 ms12.99 ms114.9 MB444 B19.62 ms as a whole process
Java -XintPurpose153.38 ms3.38 ms148.14 ms151.74 ms70.1 MB595 B18.64 ms as a whole process
Java (JIT), warmed upPurpose10.64 ms345.67 µs10.12 ms16.23 ms401.8 MB595 B17.27 ms as a whole process
WaxNormal101.00 ms2.70 ms98.60 ms99.50 ms8.8 MB956 B132.58 µs cold, 458 ns warm; 2.66 ms as a whole process4.0 MB counted by Wax; 592 B compiled
Luau (interpreter)Normal143.69 ms7.16 ms132.63 ms132.87 ms43.3 MB799 B5.15 ms as a whole process
LuaJIT -joffNormal128.37 ms1.16 ms126.72 ms128.11 ms39.0 MB799 B2.36 ms as a whole process
LuaJIT (JIT)Normal83.41 ms1.23 ms81.13 ms82.24 ms44.3 MB799 B2.51 ms as a whole process
Node --jitlessNormal115.99 ms1.73 ms114.37 ms116.74 ms213.4 MB878 B18.58 ms as a whole process
Node (JIT), from coldNormal14.19 ms925.55 µs13.27 ms17.17 ms129.7 MB878 B18.43 ms as a whole process
Node (JIT), warmed upNormal13.41 ms76.48 µs13.26 ms16.89 ms224.0 MB878 B18.92 ms as a whole process
Java -XintNormal159.48 ms2.35 ms157.52 ms162.33 ms86.9 MB1.0 KB16.98 ms as a whole process
Java (JIT), warmed upNormal10.32 ms1.34 ms9.55 ms17.26 ms518.3 MB1.0 KB18.12 ms as a whole process
WaxCeil.source103.03 ms2.55 ms98.77 ms102.19 ms8.8 MB956 B142.12 µs cold, 291 ns warm; 2.81 ms as a whole process4.0 MB counted by Wax; 592 B compiled; the Normal program stands in
WaxCeil.machine99.45 ms574.69 µs98.74 ms100.17 ms8.8 MB956 B2.67 ms cold, 250 ns warm; 2.84 ms as a whole process4.0 MB counted by Wax; 592 B compiled; the Normal program stands in
WaxCeil.program85.29 ms264.48 µs84.80 ms87.28 ms8.5 MB956 B132.00 µs cold, 208 ns warm; 2.69 ms as a whole process4.0 MB counted by Wax; 592 B compiled; the Normal program stands in
WaxCeil.machine.program98.42 ms1.09 ms96.81 ms100.53 ms8.6 MB956 B343.12 µs cold, 208 ns warm; 2.72 ms as a whole process4.0 MB counted by Wax; 592 B compiled; the Normal program stands in
Luau (interpreter)Ceil.source129.97 ms2.97 ms125.94 ms128.45 ms42.0 MB799 B5.29 ms as a whole processthe Normal program stands in
LuaJIT -joffCeil.source129.93 ms2.04 ms127.31 ms127.95 ms39.5 MB799 B2.60 ms as a whole processthe Normal program stands in
LuaJIT (JIT)Ceil.source82.03 ms967.06 µs81.23 ms81.45 ms43.0 MB799 B2.51 ms as a whole processthe Normal program stands in
Node --jitlessCeil.source112.83 ms1.88 ms111.14 ms116.22 ms213.5 MB878 B18.50 ms as a whole processthe Normal program stands in
Node (JIT), from coldCeil.source14.32 ms942.14 µs13.44 ms17.15 ms129.8 MB878 B19.00 ms as a whole processthe Normal program stands in
Node (JIT), warmed upCeil.source13.73 ms684.94 µs13.26 ms17.14 ms224.1 MB878 B19.21 ms as a whole processthe Normal program stands in
Java -XintCeil.source166.41 ms18.40 ms157.00 ms164.88 ms86.8 MB1.0 KB17.91 ms as a whole processthe Normal program stands in
Java (JIT), warmed upCeil.source9.82 ms273.48 µs9.57 ms17.70 ms518.7 MB1.0 KB20.06 ms as a whole processthe Normal program stands in

1,000 patrolling scripts

Tests: loading, pausing, footprint. Each script is loaded from its own copy of the same text and paused in its patrol; then every one is resumed 100 times, and then a procedure of each is called 100 times. Purpose isolates pausing: one script, resumed 1000000 times. Each row is 10 whole processes. Loading is timed three ways: every script from a text of its own, so that nothing compiled is reused; every script from the same text, where Wax reuses what it compiled, and the other engines compile once and make each script from that; and every script from a compiled file of its own, a .waxc for Wax and string.dump's bytecode, as luajit -b writes it, for LuaJIT (D171). Wax frees each script loaded from a text or a file of its own inside its timing, before loading the next.

EngineKindLoad, each from its own textLoad, each from the same textLoad, each from a compiled file (D141)Resume, eachCall, eachMemory, each scriptPeak memoryNotes
WaxPurpose76.72 µs (±28.68 µs, least 54.58 µs)25.54 µs (±9.72 µs, least 15.79 µs)12.60 µs (±10.23 µs, least 7.67 µs)19 ns (±0 ns, least 19 ns)38 ns (±0 ns, least 37 ns)512 B4.3 MBcounted by Wax
Luau (interpreter)Purpose13.26 µs (±5.51 µs, least 10.00 µs)20.32 µs (±7.77 µs, least 15.42 µs)?42 ns (±2 ns, least 39 ns)20 ns (±1 ns, least 19 ns)3.0 KB4.8 MBthe engine's own heap
LuaJIT -joffPurpose3.40 µs (±516 ns, least 3.00 µs)7.60 µs (±1.78 µs, least 6.00 µs)1.80 µs (±789 ns, least 1.00 µs)23 ns (±1 ns, least 22 ns)14 ns (±1 ns, least 11 ns)1.2 KB1.9 MBthe engine's own heap
LuaJIT (JIT)Purpose3.70 µs (±483 ns, least 3.00 µs)6.60 µs (±1.26 µs, least 5.00 µs)1.60 µs (±699 ns, least 1.00 µs)13 ns (±0 ns, least 13 ns)0 ns (±0 ns, least 0 ns)1.2 KB2.2 MBthe engine's own heap
Node --jitlessPurpose34.87 µs (±4.67 µs, least 26.92 µs)41.58 µs (±4.02 µs, least 37.04 µs)?57 ns (±2 ns, least 55 ns)30 ns (±0 ns, least 30 ns)0 B45.9 MBthe engine's own heap
Node (JIT)Purpose40.52 µs (±14.53 µs, least 29.88 µs)45.64 µs (±15.11 µs, least 37.04 µs)?9 ns (±0 ns, least 8 ns)2 ns (±0 ns, least 2 ns)0 B53.2 MBthe engine's own heap
WaxNormal4.81 µs (±266 ns, least 4.52 µs)189 ns (±17 ns, least 166 ns)604 ns (±146 ns, least 529 ns)22 ns (±3 ns, least 20 ns)40 ns (±4 ns, least 37 ns)512 B10.3 MBcounted by Wax
Luau (interpreter)Normal5.03 µs (±189 ns, least 4.78 µs)196 ns (±12 ns, least 179 ns)?34 ns (±1 ns, least 33 ns)18 ns (±1 ns, least 17 ns)2.0 KB6.3 MBthe engine's own heap
LuaJIT -joffNormal1.88 µs (±75 ns, least 1.77 µs)193 ns (±13 ns, least 177 ns)331 ns (±61 ns, least 291 ns)30 ns (±3 ns, least 27 ns)17 ns (±4 ns, least 13 ns)1.0 KB5.2 MBthe engine's own heap
LuaJIT (JIT)Normal1.82 µs (±21 ns, least 1.80 µs)370 ns (±46 ns, least 332 ns)499 ns (±60 ns, least 334 ns)98 ns (±7 ns, least 90 ns)104 ns (±6 ns, least 100 ns)1.0 KB6.0 MBthe engine's own heap
Node --jitlessNormal1.28 µs (±248 ns, least 1.14 µs)754 ns (±120 ns, least 670 ns)?52 ns (±2 ns, least 49 ns)24 ns (±1 ns, least 24 ns)643 B48.8 MBthe engine's own heap
Node (JIT)Normal1.12 µs (±38 ns, least 1.06 µs)679 ns (±11 ns, least 668 ns)?22 ns (±1 ns, least 21 ns)6 ns (±1 ns, least 5 ns)643 B56.1 MBthe engine's own heap
WaxCeil.source4.67 µs (±62 ns, least 4.59 µs)182 ns (±21 ns, least 154 ns)558 ns (±60 ns, least 523 ns)20 ns (±0 ns, least 20 ns)38 ns (±1 ns, least 37 ns)512 B10.3 MBcounted by Wax; the Normal program stands in
WaxCeil.machine4.55 µs (±53 ns, least 4.47 µs)158 ns (±8 ns, least 148 ns)549 ns (±17 ns, least 529 ns)20 ns (±0 ns, least 20 ns)38 ns (±1 ns, least 37 ns)512 B10.3 MBcounted by Wax; the Normal program stands in
WaxCeil.program3.94 µs (±48 ns, least 3.84 µs)142 ns (±9 ns, least 129 ns)473 ns (±14 ns, least 455 ns)17 ns (±0 ns, least 17 ns)34 ns (±0 ns, least 33 ns)512 B10.1 MBcounted by Wax; the Normal program stands in
WaxCeil.machine.program3.91 µs (±76 ns, least 3.82 µs)140 ns (±9 ns, least 131 ns)465 ns (±11 ns, least 453 ns)17 ns (±0 ns, least 17 ns)34 ns (±0 ns, least 34 ns)512 B10.1 MBcounted by Wax; the Normal program stands in
Luau (interpreter)Ceil.source4.93 µs (±140 ns, least 4.77 µs)184 ns (±8 ns, least 174 ns)?34 ns (±1 ns, least 33 ns)18 ns (±0 ns, least 17 ns)2.0 KB6.3 MBthe engine's own heap; the Normal program stands in
LuaJIT -joffCeil.source1.82 µs (±20 ns, least 1.77 µs)186 ns (±8 ns, least 180 ns)278 ns (±6 ns, least 270 ns)28 ns (±1 ns, least 27 ns)16 ns (±2 ns, least 13 ns)1.0 KB5.2 MBthe engine's own heap; the Normal program stands in
LuaJIT (JIT)Ceil.source1.85 µs (±17 ns, least 1.82 µs)358 ns (±20 ns, least 334 ns)492 ns (±63 ns, least 321 ns)98 ns (±5 ns, least 92 ns)104 ns (±6 ns, least 100 ns)1.0 KB6.1 MBthe engine's own heap; the Normal program stands in
Node --jitlessCeil.source1.16 µs (±28 ns, least 1.11 µs)672 ns (±17 ns, least 644 ns)?50 ns (±1 ns, least 48 ns)23 ns (±1 ns, least 23 ns)643 B48.8 MBthe engine's own heap; the Normal program stands in
Node (JIT)Ceil.source1.12 µs (±16 ns, least 1.09 µs)662 ns (±22 ns, least 624 ns)?21 ns (±1 ns, least 21 ns)6 ns (±1 ns, least 5 ns)643 B56.0 MBthe engine's own heap; the Normal program stands in

What Wax's checks cost (Purpose)

D58 asks for the cost of Wax's checks to be measured, not guessed. Each row runs a Normal program on a build of the VM with one kind of check left out. Those builds exist only for this table: a script never runs without its checks (D17).

BenchmarkWith every checkWithout the-float-check
fib(32), recursive30.96 ms31.68 ms (+2.3%)
n-body, 100,000 steps52.97 ms48.79 ms (-7.9%)
spectral-norm, size 20019.77 ms17.44 ms (-11.8%)
fannkuch-redux, 9102.23 ms109.35 ms (+7.0%)
word count, 500,000 words25.93 ms26.14 ms (+0.8%)
text building, 20,000 joins366.14 µs375.72 µs (+2.6%)
binary-trees, depth 14103.66 ms108.22 ms (+4.4%)

The big number types against Python (D155, D159), Normal

Python's built-ins are the bar: int for HugeWhole, and decimal for Decimal (set to decimal128's rules) and HugeDecimal (with room for every digit, so it's exact). gmpy2, Python's binding to GMP, is shown for reference, with no target; it has no decimal type, so it runs the HugeWhole programs only. The Float row shows what exactness costs.

ProgramWax meanWax deviationWax leastWax peak memoryPython meanPython leastgmpy2 mean
HugeWhole: 3000 factorial, 9,131 digits1.58 ms293.02 µs1.36 ms3.9 MB1.61 ms1.58 ms318.23 µs
HugeWhole: an idle game's gold over 20,000 ticks, upgrades doubling it, 604 digits1.41 ms28.39 µs1.39 ms3.7 MB1.56 ms1.52 ms1.12 ms
Decimal: 1,000,000 prices summed with tax, then split three ways114.20 ms299.32 µs113.92 ms3.1 MB176.79 ms163.55 ms–
Decimal: 1,000,000 days of interest compounding, a cent put in each day73.79 ms1.67 ms72.70 ms3.1 MB86.95 ms83.74 ms–
HugeDecimal: 2,000 years of exact 5% interest, 4,048 digits452.99 µs9.03 µs445.46 µs3.7 MB942.22 µs908.17 µs–
HugeDecimal: the money sums, kept exactly97.57 ms3.08 ms92.05 ms3.1 MB165.46 ms163.98 ms–
the money sums in Floats, as a yardstick10.58 ms202.61 µs10.24 ms3.0 MB–––

Door calls through C (D136, D152), Purpose

A loop calling a host door 1,000,000 times, each call handing it two whole numbers it multiplies and adds to a total; the time is the best of seven runs, divided by the calls. Wax's door is written in C, through Wax's C API (crates/wax-c/tests/api_test.c), and in Rust, which the C API aims to match. LuaJIT's is a C function registered with its C API, reading its numbers with luaL_checkinteger, as Wax's door checks their kinds (bench/drivers/doors.luajit.c). Luau's C library isn't installed here, so it has no row.

EngineDoor written inEach callNotes
WaxC15 ns
WaxRust8 ns
LuaJIT -joffC7 ns
LuaJIT (JIT)C8 ns