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 theluaucommand). - 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 byjavacfirst, outside its timing. - Python:
Python 3.14.7, withgmpy22.3.2(on GMP), intarget/bench-python, whichbench/run.shmakes; Python'sdecimalis on libmpdec4.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;
runis 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.sourceruns the tuned program on the usual build.Ceil.machinebuilds Wax's VM for this exact CPU,Ceil.programbuilds it with a profile of the benchmarks' own run, andCeil.machine.programdoes 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)
| Goal | Benchmark | Wax | Against | Verdict |
|---|---|---|---|---|
| 1. Faster than Luau's interpreter | fib(32), recursive | 32.10 ms | 74.48 ms | met: Wax takes 43% of its time |
| 1. Faster than Luau's interpreter | n-body, 100,000 steps | 52.99 ms | 71.10 ms | met: Wax takes 75% of its time |
| 1. Faster than Luau's interpreter | spectral-norm, size 200 | 18.58 ms | 27.51 ms | met: Wax takes 68% of its time |
| 1. Faster than Luau's interpreter | fannkuch-redux, 9 | 100.62 ms | 211.75 ms | met: Wax takes 48% of its time |
| 1. Faster than Luau's interpreter | word count, 500,000 words | 24.79 ms | 30.28 ms | met: Wax takes 82% of its time |
| 1. Faster than Luau's interpreter | text building, 20,000 joins | 348.19 µs | 177.96 ms | met: Wax takes 0.2% of its time |
| 1. Faster than Luau's interpreter | binary-trees, depth 14 | 101.00 ms | 143.69 ms | met: Wax takes 70% of its time |
| 1. Faster than Luau's interpreter | patrolling scripts, the whole run: loading 1000 from one text, resuming each 100 times | 2.37 ms | 3.61 ms | met: Wax takes 66% of its time |
| 1. Faster than Luau's interpreter | patrolling scripts, resuming each | 22 ns | 34 ns | met: Wax takes 64% of its time |
| 1. Faster than Luau's interpreter | patrolling scripts, loading each from the same text | 189 ns | 196 ns | met: Wax takes 96% of its time |
| 1. Faster than Luau's interpreter | patrolling scripts, loading each from a text of its own | 4.81 µs | 5.03 µs | met: Wax takes 96% of its time |
| 1. Faster than LuaJIT's interpreter | fib(32), recursive | 32.10 ms | 34.79 ms | met: Wax takes 92% of its time |
| 1. Faster than LuaJIT's interpreter | n-body, 100,000 steps | 52.99 ms | 74.44 ms | met: Wax takes 71% of its time |
| 1. Faster than LuaJIT's interpreter | spectral-norm, size 200 | 18.58 ms | 47.64 ms | met: Wax takes 39% of its time |
| 1. Faster than LuaJIT's interpreter | fannkuch-redux, 9 | 100.62 ms | 148.32 ms | met: Wax takes 68% of its time |
| 1. Faster than LuaJIT's interpreter | word count, 500,000 words | 24.79 ms | 32.00 ms | met: Wax takes 77% of its time |
| 1. Faster than LuaJIT's interpreter | text building, 20,000 joins | 348.19 µs | 43.27 ms | met: Wax takes 0.8% of its time |
| 1. Faster than LuaJIT's interpreter | binary-trees, depth 14 | 101.00 ms | 128.37 ms | met: Wax takes 79% of its time |
| 1. Faster than LuaJIT's interpreter | patrolling scripts, the whole run: loading 1000 from one text, resuming each 100 times | 2.37 ms | 3.16 ms | met: Wax takes 75% of its time |
| 1. Faster than LuaJIT's interpreter | patrolling scripts, resuming each | 22 ns | 30 ns | met: Wax takes 73% of its time |
| 1. Faster than LuaJIT's interpreter | patrolling scripts, loading each from the same text | 189 ns | 193 ns | met: Wax takes 98% of its time |
| 1. Faster than LuaJIT's interpreter | patrolling scripts, loading each from a text of its own | 4.81 µs | 1.88 µs | for reference, no target (D150) |
| D171, D176. Within twice LuaJIT loading its own bytecode | patrolling scripts, loading each from a compiled file of its own | 604 ns | 331 ns | met: Wax takes 182% of its time |
| D176. Loading the same compiled file again | patrolling scripts, each loaded from one .waxc file, reusing what was verified | 135 ns | for reference, no target | |
D171. Checking a .waxc file's signature, once per file | patrolling scripts, loading each signed file of its own, signature checked | 41.33 µs | for reference, no target | |
| D152. A door call through C as fast as a Rust door | 1,000,000 door calls from a loop | 15 ns | a Rust door: 8 ns; LuaJIT's C API: 7 ns | an aim, no target: 1.8× a Rust door's time |
| D155. Faster than Python's built-ins | HugeWhole: 3000 factorial, 9,131 digits | 1.58 ms | 1.61 ms | met: Wax takes 98% of its time |
| D155. Faster than Python's built-ins | HugeWhole: an idle game's gold over 20,000 ticks, upgrades doubling it, 604 digits | 1.41 ms | 1.56 ms | met: Wax takes 91% of its time |
| D155. Faster than Python's built-ins | Decimal: 1,000,000 prices summed with tax, then split three ways | 114.20 ms | 176.79 ms | met: Wax takes 65% of its time |
| D155. Faster than Python's built-ins | Decimal: 1,000,000 days of interest compounding, a cent put in each day | 73.79 ms | 86.95 ms | met: Wax takes 85% of its time |
| D155. Faster than Python's built-ins | HugeDecimal: 2,000 years of exact 5% interest, 4,048 digits | 452.99 µs | 942.22 µs | met: Wax takes 48% of its time |
| D155. Faster than Python's built-ins | HugeDecimal: the money sums, kept exactly | 97.57 ms | 165.46 ms | met: Wax takes 59% of its time |
2. Faster than V8 --jitless | fib(32), recursive | 32.10 ms | 93.36 ms | met: Wax takes 34% of its time |
2. Faster than V8 --jitless | n-body, 100,000 steps | 52.99 ms | 186.88 ms | met: Wax takes 28% of its time |
2. Within twice V8 --jitless | word count, 500,000 words | 24.79 ms | 52.71 ms | met: Wax takes 47% of its time |
2. Within twice V8 --jitless | text building, 20,000 joins | 348.19 µs | 508.81 µs | met: Wax takes 68% of its time |
| 6. Pausing costs about as much as a call | patrolling scripts | resume 22 ns | host call 40 ns | met |
| 5. Thousands of scripts, each costing kilobytes | patrolling scripts | 512 B each, counted | met |
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.
| Benchmark | Wax | Java -Xint | Luau (interpreter) | Wax's share of Java's time |
|---|---|---|---|---|
fib(32), recursive | 32.10 ms | 92.37 ms | 74.48 ms | 35% |
| n-body, 100,000 steps | 52.99 ms | 63.24 ms | 71.10 ms | 84% |
| spectral-norm, size 200 | 18.58 ms | 27.76 ms | 27.51 ms | 67% |
| fannkuch-redux, 9 | 100.62 ms | 124.77 ms | 211.75 ms | 81% |
| word count, 500,000 words | 24.79 ms | 840.43 ms | 30.28 ms | 3.0% |
| text building, 20,000 joins | 348.19 µs | 116.61 ms | 177.96 ms | 0.3% |
| binary-trees, depth 14 | 101.00 ms | 159.48 ms | 143.69 ms | 63% |
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.
| Row | Kind | Before | After | Luau's interpreter now | What changed |
|---|---|---|---|---|---|
word count: a Dict with text keys | Purpose | 125.14 ms | 60.00 ms | 62.39 ms | hashes built without memory copies, kept with their text; a read-then-set looked up once |
| a host calling a script's procedure | Normal, call each | 41 ns | 40 ns | 18 ns | the last call's stack reused; see below |
| loading from a text of its own | Purpose | 58.95 µs | 76.72 µs (±28.68) | 13.26 µs | none: it's a fresh process's first load, mostly mapping in code; see below |
| a loop over a list of floats | Purpose | 55.13 ms | 13.75 ms | 46.25 ms | a loop that only adds each item into a total is one instruction |
| reversing a short list in place | Purpose | 85.40 ms | 81.81 ms | 88.57 ms | a plain value set with no copy first |
| reaching a list item's fields (n-body) | Normal | 64.78 ms | 52.99 ms | 71.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.
| Engine | Kind | Mean | Deviation | Least | First run | Peak memory | Program | Load | Notes |
|---|---|---|---|---|---|---|---|---|---|
| Wax | Purpose | 85.41 ms | 1.22 ms | 84.35 ms | 102.36 ms | 3.0 MB | 377 B | 849.96 µs cold, 375 ns warm; 2.89 ms as a whole process | 32.0 KB counted by Wax; 176 B compiled |
| Luau (interpreter) | Purpose | 201.86 ms | 3.47 ms | 197.63 ms | 215.47 ms | 4.8 MB | 339 B | 5.69 ms as a whole process | |
LuaJIT -joff | Purpose | 91.37 ms | 1.13 ms | 89.08 ms | 91.96 ms | 1.9 MB | 339 B | 2.41 ms as a whole process | |
| LuaJIT (JIT) | Purpose | 44.27 ms | 174.16 µs | 44.03 ms | 46.55 ms | 2.3 MB | 339 B | 2.41 ms as a whole process | |
Node --jitless | Purpose | 335.13 ms | 15.51 ms | 324.68 ms | 327.26 ms | 43.5 MB | 362 B | 19.82 ms as a whole process | |
| Node (JIT), from cold | Purpose | 127.77 ms | 1.11 ms | 126.69 ms | 129.45 ms | 49.2 MB | 362 B | 20.22 ms as a whole process | |
| Node (JIT), warmed up | Purpose | 127.74 ms | 1.80 ms | 125.53 ms | 127.01 ms | 49.4 MB | 362 B | 20.02 ms as a whole process | |
Java -Xint | Purpose | 208.04 ms | 3.92 ms | 201.76 ms | 204.08 ms | 38.7 MB | 373 B | 18.57 ms as a whole process | |
| Java (JIT), warmed up | Purpose | 44.38 ms | 1.01 ms | 43.31 ms | 49.07 ms | 42.1 MB | 373 B | 22.11 ms as a whole process | |
| Wax | Normal | 32.10 ms | 847.19 µs | 31.19 ms | 34.94 ms | 3.0 MB | 169 B | 90.83 µs cold, 333 ns warm; 2.56 ms as a whole process | 2.0 KB counted by Wax; 88 B compiled |
| Luau (interpreter) | Normal | 74.48 ms | 2.01 ms | 72.69 ms | 75.10 ms | 4.8 MB | 143 B | 5.50 ms as a whole process | |
LuaJIT -joff | Normal | 34.79 ms | 853.49 µs | 33.97 ms | 34.62 ms | 1.9 MB | 143 B | 2.55 ms as a whole process | |
| LuaJIT (JIT) | Normal | 7.15 ms | 109.65 µs | 7.04 ms | 7.57 ms | 2.2 MB | 143 B | 2.49 ms as a whole process | |
Node --jitless | Normal | 93.36 ms | 821.67 µs | 91.97 ms | 96.22 ms | 43.5 MB | 137 B | 18.78 ms as a whole process | |
| Node (JIT), from cold | Normal | 9.59 ms | 474.19 µs | 9.39 ms | 10.88 ms | 48.7 MB | 137 B | 19.18 ms as a whole process | |
| Node (JIT), warmed up | Normal | 9.56 ms | 43.84 µs | 9.51 ms | 10.02 ms | 48.8 MB | 137 B | 19.34 ms as a whole process | |
Java -Xint | Normal | 92.37 ms | 349.12 µs | 91.98 ms | 94.47 ms | 38.4 MB | 153 B | 17.28 ms as a whole process | |
| Java (JIT), warmed up | Normal | 2.97 ms | 58.64 µs | 2.91 ms | 3.22 ms | 42.0 MB | 153 B | 17.72 ms as a whole process | |
| Wax | Ceil.source | 31.24 ms | 476.47 µs | 30.44 ms | 30.26 ms | 3.0 MB | 169 B | 87.08 µs cold, 208 ns warm; 2.88 ms as a whole process | 2.0 KB counted by Wax; 88 B compiled; the Normal program stands in |
| Wax | Ceil.machine | 33.66 ms | 1.65 ms | 31.56 ms | 51.12 ms | 2.9 MB | 169 B | 1.09 ms cold, 625 ns warm; 2.93 ms as a whole process | 2.0 KB counted by Wax; 88 B compiled; the Normal program stands in |
| Wax | Ceil.program | 29.03 ms | 458.62 µs | 28.50 ms | 42.71 ms | 2.6 MB | 169 B | 846.38 µs cold, 1.12 µs warm; 2.90 ms as a whole process | 2.0 KB counted by Wax; 88 B compiled; the Normal program stands in |
| Wax | Ceil.machine.program | 30.81 ms | 104.52 µs | 30.63 ms | 51.22 ms | 2.7 MB | 169 B | 773.12 µs cold, 417 ns warm; 2.62 ms as a whole process | 2.0 KB counted by Wax; 88 B compiled; the Normal program stands in |
| Luau (interpreter) | Ceil.source | 73.34 ms | 893.57 µs | 72.10 ms | 71.87 ms | 4.9 MB | 143 B | 5.26 ms as a whole process | the Normal program stands in |
LuaJIT -joff | Ceil.source | 34.08 ms | 75.44 µs | 33.98 ms | 33.85 ms | 1.9 MB | 143 B | 2.37 ms as a whole process | the Normal program stands in |
| LuaJIT (JIT) | Ceil.source | 7.12 ms | 22.33 µs | 7.09 ms | 7.35 ms | 2.2 MB | 143 B | 2.38 ms as a whole process | the Normal program stands in |
Node --jitless | Ceil.source | 98.43 ms | 5.45 ms | 94.02 ms | 95.85 ms | 43.5 MB | 137 B | 19.89 ms as a whole process | the Normal program stands in |
| Node (JIT), from cold | Ceil.source | 9.75 ms | 217.22 µs | 9.56 ms | 10.30 ms | 48.7 MB | 137 B | 19.83 ms as a whole process | the Normal program stands in |
| Node (JIT), warmed up | Ceil.source | 9.72 ms | 77.44 µs | 9.63 ms | 11.32 ms | 48.7 MB | 137 B | 20.94 ms as a whole process | the Normal program stands in |
Java -Xint | Ceil.source | 88.22 ms | 1.71 ms | 86.27 ms | 88.03 ms | 38.5 MB | 153 B | 18.84 ms as a whole process | the Normal program stands in |
| Java (JIT), warmed up | Ceil.source | 2.91 ms | 96.07 µs | 2.84 ms | 3.11 ms | 41.9 MB | 153 B | 18.84 ms as a whole process | the 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.
| Engine | Kind | Mean | Deviation | Least | First run | Peak memory | Program | Load | Notes |
|---|---|---|---|---|---|---|---|---|---|
| Wax | Purpose | 50.73 ms | 599.26 µs | 50.00 ms | 52.15 ms | 2.9 MB | 532 B | 182.00 µs cold, 250 ns warm; 2.62 ms as a whole process | 512 B counted by Wax; 232 B compiled |
| Luau (interpreter) | Purpose | 92.87 ms | 633.14 µs | 92.00 ms | 93.16 ms | 4.8 MB | 433 B | 5.42 ms as a whole process | |
LuaJIT -joff | Purpose | 77.06 ms | 273.30 µs | 76.62 ms | 76.17 ms | 1.9 MB | 433 B | 2.57 ms as a whole process | |
| LuaJIT (JIT) | Purpose | 6.79 ms | 34.57 µs | 6.76 ms | 6.87 ms | 2.1 MB | 433 B | 2.48 ms as a whole process | |
Node --jitless | Purpose | 246.50 ms | 1.79 ms | 243.98 ms | 245.56 ms | 46.7 MB | 460 B | 20.22 ms as a whole process | |
| Node (JIT), from cold | Purpose | 19.19 ms | 157.69 µs | 18.96 ms | 19.23 ms | 50.3 MB | 460 B | 19.36 ms as a whole process | |
| Node (JIT), warmed up | Purpose | 19.19 ms | 286.45 µs | 18.86 ms | 19.24 ms | 50.4 MB | 460 B | 19.88 ms as a whole process | |
Java -Xint | Purpose | 99.06 ms | 1.15 ms | 97.55 ms | 98.12 ms | 38.5 MB | 522 B | 17.56 ms as a whole process | |
| Java (JIT), warmed up | Purpose | 6.28 ms | 200.67 µs | 5.95 ms | 17.05 ms | 41.9 MB | 522 B | 18.11 ms as a whole process | |
| Wax | Normal | 52.99 ms | 381.50 µs | 52.51 ms | 54.12 ms | 3.5 MB | 3.4 KB | 297.92 µs cold, 333 ns warm; 2.88 ms as a whole process | 2.0 KB counted by Wax; 1.8 KB compiled |
| Luau (interpreter) | Normal | 71.10 ms | 1.25 ms | 70.17 ms | 70.74 ms | 4.9 MB | 3.0 KB | 5.69 ms as a whole process | |
LuaJIT -joff | Normal | 74.44 ms | 1.05 ms | 72.38 ms | 73.55 ms | 1.9 MB | 3.0 KB | 2.96 ms as a whole process | |
| LuaJIT (JIT) | Normal | 5.46 ms | 86.32 µs | 5.36 ms | 5.79 ms | 2.2 MB | 3.0 KB | 2.80 ms as a whole process | |
Node --jitless | Normal | 186.88 ms | 8.50 ms | 176.39 ms | 192.80 ms | 48.3 MB | 3.1 KB | 19.84 ms as a whole process | |
| Node (JIT), from cold | Normal | 3.94 ms | 78.05 µs | 3.86 ms | 5.87 ms | 52.0 MB | 3.1 KB | 19.79 ms as a whole process | |
| Node (JIT), warmed up | Normal | 3.90 ms | 24.58 µs | 3.85 ms | 5.95 ms | 52.1 MB | 3.1 KB | 19.35 ms as a whole process | |
Java -Xint | Normal | 63.24 ms | 1.43 ms | 61.67 ms | 62.71 ms | 38.5 MB | 3.4 KB | 17.93 ms as a whole process | |
| Java (JIT), warmed up | Normal | 5.76 ms | 2.25 ms | 3.59 ms | 9.14 ms | 43.6 MB | 3.4 KB | 20.79 ms as a whole process | |
| Wax | Ceil.source | 47.22 ms | 783.99 µs | 46.34 ms | 50.77 ms | 3.4 MB | 3.4 KB | 271.83 µs cold, 375 ns warm; 2.93 ms as a whole process | 2.0 KB counted by Wax; 1.8 KB compiled |
| Wax | Ceil.machine | 48.47 ms | 853.89 µs | 47.47 ms | 48.53 ms | 3.4 MB | 3.4 KB | 305.04 µs cold, 292 ns warm; 3.03 ms as a whole process | 2.0 KB counted by Wax; 1.8 KB compiled |
| Wax | Ceil.program | 41.02 ms | 302.70 µs | 40.58 ms | 40.96 ms | 3.1 MB | 3.4 KB | 264.00 µs cold, 250 ns warm; 2.94 ms as a whole process | 2.0 KB counted by Wax; 1.8 KB compiled |
| Wax | Ceil.machine.program | 42.02 ms | 171.87 µs | 41.81 ms | 42.33 ms | 3.1 MB | 3.4 KB | 283.04 µs cold, 208 ns warm; 3.08 ms as a whole process | 2.0 KB counted by Wax; 1.8 KB compiled |
| Luau (interpreter) | Ceil.source | 69.44 ms | 190.04 µs | 69.21 ms | 69.44 ms | 4.8 MB | 3.0 KB | 5.61 ms as a whole process | the Normal program stands in |
LuaJIT -joff | Ceil.source | 72.55 ms | 501.40 µs | 71.91 ms | 71.12 ms | 1.9 MB | 3.0 KB | 2.65 ms as a whole process | the Normal program stands in |
| LuaJIT (JIT) | Ceil.source | 5.23 ms | 33.39 µs | 5.17 ms | 5.45 ms | 2.2 MB | 3.0 KB | 2.44 ms as a whole process | the Normal program stands in |
Node --jitless | Ceil.source | 179.12 ms | 3.85 ms | 174.69 ms | 183.21 ms | 48.2 MB | 3.1 KB | 19.65 ms as a whole process | the Normal program stands in |
| Node (JIT), from cold | Ceil.source | 4.00 ms | 149.56 µs | 3.90 ms | 6.67 ms | 52.2 MB | 3.1 KB | 20.07 ms as a whole process | the Normal program stands in |
| Node (JIT), warmed up | Ceil.source | 3.94 ms | 27.68 µs | 3.90 ms | 5.86 ms | 52.0 MB | 3.1 KB | 20.65 ms as a whole process | the Normal program stands in |
Java -Xint | Ceil.source | 64.09 ms | 2.88 ms | 61.59 ms | 68.18 ms | 38.4 MB | 3.4 KB | 18.64 ms as a whole process | the Normal program stands in |
| Java (JIT), warmed up | Ceil.source | 3.49 ms | 64.22 µs | 3.42 ms | 6.77 ms | 43.7 MB | 3.4 KB | 18.49 ms as a whole process | the 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.
| Engine | Kind | Mean | Deviation | Least | First run | Peak memory | Program | Load | Notes |
|---|---|---|---|---|---|---|---|---|---|
| Wax | Purpose | 13.75 ms | 57.81 µs | 13.67 ms | 13.75 ms | 3.1 MB | 393 B | 110.71 µs cold, 250 ns warm; 2.85 ms as a whole process | 8.5 KB counted by Wax; 216 B compiled |
| Luau (interpreter) | Purpose | 46.25 ms | 2.25 ms | 44.99 ms | 45.23 ms | 4.8 MB | 366 B | 5.09 ms as a whole process | |
LuaJIT -joff | Purpose | 77.51 ms | 92.15 µs | 77.32 ms | 77.49 ms | 2.0 MB | 366 B | 2.54 ms as a whole process | |
| LuaJIT (JIT) | Purpose | 23.17 ms | 118.48 µs | 23.02 ms | 23.51 ms | 2.2 MB | 366 B | 2.50 ms as a whole process | |
Node --jitless | Purpose | 371.39 ms | 8.60 ms | 362.69 ms | 383.84 ms | 48.8 MB | 398 B | 18.62 ms as a whole process | |
| Node (JIT), from cold | Purpose | 34.31 ms | 36.36 ms | 15.62 ms | 21.15 ms | 52.9 MB | 398 B | 19.23 ms as a whole process | |
| Node (JIT), warmed up | Purpose | 14.74 ms | 275.67 µs | 14.36 ms | 18.61 ms | 55.5 MB | 398 B | 19.49 ms as a whole process | |
Java -Xint | Purpose | 77.00 ms | 4.10 ms | 74.76 ms | 76.26 ms | 38.6 MB | 426 B | 18.17 ms as a whole process | |
| Java (JIT), warmed up | Purpose | 9.81 ms | 155.43 µs | 9.63 ms | 12.44 ms | 42.4 MB | 426 B | 18.40 ms as a whole process | |
| Wax | Normal | 18.58 ms | 97.48 µs | 18.43 ms | 18.06 ms | 3.2 MB | 1.2 KB | 151.62 µs cold, 292 ns warm; 2.58 ms as a whole process | 9.2 KB counted by Wax; 992 B compiled |
| Luau (interpreter) | Normal | 27.51 ms | 341.75 µs | 27.00 ms | 28.06 ms | 4.9 MB | 981 B | 5.19 ms as a whole process | |
LuaJIT -joff | Normal | 47.64 ms | 892.49 µs | 45.96 ms | 46.09 ms | 2.0 MB | 981 B | 2.62 ms as a whole process | |
| LuaJIT (JIT) | Normal | 1.53 ms | 18.60 µs | 1.52 ms | 1.69 ms | 2.3 MB | 981 B | 2.50 ms as a whole process | |
Node --jitless | Normal | 64.47 ms | 242.37 µs | 64.15 ms | 64.08 ms | 48.5 MB | 1.0 KB | 19.33 ms as a whole process | |
| Node (JIT), from cold | Normal | 1.61 ms | 178.13 µs | 1.49 ms | 3.25 ms | 53.0 MB | 1.0 KB | 19.18 ms as a whole process | |
| Node (JIT), warmed up | Normal | 1.67 ms | 12.87 µs | 1.65 ms | 3.24 ms | 53.0 MB | 1.0 KB | 19.86 ms as a whole process | |
Java -Xint | Normal | 27.76 ms | 337.14 µs | 27.18 ms | 27.20 ms | 39.3 MB | 1.1 KB | 17.96 ms as a whole process | |
| Java (JIT), warmed up | Normal | 684.08 µs | 53.21 µs | 658.12 µs | 4.47 ms | 44.7 MB | 1.1 KB | 18.35 ms as a whole process | |
| Wax | Ceil.source | 18.25 ms | 269.57 µs | 17.92 ms | 18.34 ms | 3.2 MB | 1.2 KB | 151.96 µs cold, 292 ns warm; 2.84 ms as a whole process | 9.2 KB counted by Wax; 992 B compiled; the Normal program stands in |
| Wax | Ceil.machine | 17.99 ms | 470.97 µs | 17.50 ms | 18.03 ms | 3.2 MB | 1.2 KB | 152.17 µs cold, 208 ns warm; 2.74 ms as a whole process | 9.2 KB counted by Wax; 992 B compiled; the Normal program stands in |
| Wax | Ceil.program | 19.17 ms | 326.98 µs | 18.77 ms | 18.89 ms | 2.9 MB | 1.2 KB | 131.75 µs cold, 208 ns warm; 2.82 ms as a whole process | 9.2 KB counted by Wax; 992 B compiled; the Normal program stands in |
| Wax | Ceil.machine.program | 20.37 ms | 135.34 µs | 20.16 ms | 20.73 ms | 3.0 MB | 1.2 KB | 138.50 µs cold, 250 ns warm; 2.67 ms as a whole process | 9.2 KB counted by Wax; 992 B compiled; the Normal program stands in |
| Luau (interpreter) | Ceil.source | 37.33 ms | 677.52 µs | 36.28 ms | 31.05 ms | 4.8 MB | 981 B | 5.29 ms as a whole process | the Normal program stands in |
LuaJIT -joff | Ceil.source | 47.05 ms | 781.64 µs | 46.08 ms | 45.93 ms | 2.0 MB | 981 B | 2.37 ms as a whole process | the Normal program stands in |
| LuaJIT (JIT) | Ceil.source | 1.56 ms | 39.16 µs | 1.51 ms | 1.70 ms | 2.3 MB | 981 B | 2.35 ms as a whole process | the Normal program stands in |
Node --jitless | Ceil.source | 64.32 ms | 458.00 µs | 63.77 ms | 64.87 ms | 48.5 MB | 1.0 KB | 19.16 ms as a whole process | the Normal program stands in |
| Node (JIT), from cold | Ceil.source | 1.61 ms | 197.29 µs | 1.49 ms | 3.67 ms | 53.0 MB | 1.0 KB | 19.18 ms as a whole process | the Normal program stands in |
| Node (JIT), warmed up | Ceil.source | 1.66 ms | 51.92 µs | 1.62 ms | 3.36 ms | 52.9 MB | 1.0 KB | 19.29 ms as a whole process | the Normal program stands in |
Java -Xint | Ceil.source | 26.48 ms | 231.30 µs | 26.06 ms | 26.25 ms | 39.4 MB | 1.1 KB | 17.95 ms as a whole process | the Normal program stands in |
| Java (JIT), warmed up | Ceil.source | 689.92 µs | 45.95 µs | 656.71 µs | 4.51 ms | 44.8 MB | 1.1 KB | 18.16 ms as a whole process | the 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.
| Engine | Kind | Mean | Deviation | Least | First run | Peak memory | Program | Load | Notes |
|---|---|---|---|---|---|---|---|---|---|
| Wax | Purpose | 81.81 ms | 515.08 µs | 80.78 ms | 82.93 ms | 3.0 MB | 596 B | 109.21 µs cold, 333 ns warm; 2.80 ms as a whole process | 688 B counted by Wax; 280 B compiled |
| Luau (interpreter) | Purpose | 88.57 ms | 1.10 ms | 87.26 ms | 87.96 ms | 4.8 MB | 523 B | 5.34 ms as a whole process | |
LuaJIT -joff | Purpose | 53.07 ms | 505.36 µs | 52.40 ms | 50.82 ms | 1.9 MB | 523 B | 2.53 ms as a whole process | |
| LuaJIT (JIT) | Purpose | 6.18 ms | 33.42 µs | 6.15 ms | 6.31 ms | 2.2 MB | 523 B | 2.23 ms as a whole process | |
Node --jitless | Purpose | 146.04 ms | 545.95 µs | 145.12 ms | 150.17 ms | 43.5 MB | 568 B | 19.48 ms as a whole process | |
| Node (JIT), from cold | Purpose | 3.70 ms | 102.04 µs | 3.62 ms | 4.49 ms | 49.5 MB | 568 B | 19.56 ms as a whole process | |
| Node (JIT), warmed up | Purpose | 3.78 ms | 156.57 µs | 3.63 ms | 4.45 ms | 49.4 MB | 568 B | 20.41 ms as a whole process | |
Java -Xint | Purpose | 86.28 ms | 601.57 µs | 85.45 ms | 85.01 ms | 38.5 MB | 578 B | 18.32 ms as a whole process | |
| Java (JIT), warmed up | Purpose | 3.47 ms | 49.84 µs | 3.41 ms | 5.82 ms | 42.0 MB | 578 B | 18.69 ms as a whole process | |
| Wax | Normal | 100.62 ms | 567.20 µs | 99.85 ms | 101.97 ms | 3.2 MB | 1.8 KB | 166.08 µs cold, 458 ns warm; 2.87 ms as a whole process | 984 B counted by Wax; 664 B compiled |
| Luau (interpreter) | Normal | 211.75 ms | 1.30 ms | 210.06 ms | 213.40 ms | 4.8 MB | 1.7 KB | 5.38 ms as a whole process | |
LuaJIT -joff | Normal | 148.32 ms | 942.01 µs | 146.99 ms | 146.67 ms | 2.0 MB | 1.7 KB | 2.54 ms as a whole process | |
| LuaJIT (JIT) | Normal | 47.91 ms | 314.88 µs | 47.38 ms | 48.41 ms | 2.3 MB | 1.7 KB | 2.51 ms as a whole process | |
Node --jitless | Normal | 158.86 ms | 847.01 µs | 157.76 ms | 157.20 ms | 45.5 MB | 1.7 KB | 19.60 ms as a whole process | |
| Node (JIT), from cold | Normal | 14.96 ms | 81.22 µs | 14.82 ms | 16.38 ms | 52.2 MB | 1.7 KB | 19.38 ms as a whole process | |
| Node (JIT), warmed up | Normal | 14.18 ms | 85.57 µs | 14.02 ms | 15.83 ms | 52.3 MB | 1.7 KB | 19.36 ms as a whole process | |
Java -Xint | Normal | 124.77 ms | 351.20 µs | 124.09 ms | 126.62 ms | 51.3 MB | 1.7 KB | 17.81 ms as a whole process | |
| Java (JIT), warmed up | Normal | 12.81 ms | 214.82 µs | 12.48 ms | 19.58 ms | 82.4 MB | 1.7 KB | 18.40 ms as a whole process | |
| Wax | Ceil.source | 100.67 ms | 181.51 µs | 100.31 ms | 102.49 ms | 3.2 MB | 1.8 KB | 168.79 µs cold, 291 ns warm; 2.66 ms as a whole process | 984 B counted by Wax; 664 B compiled; the Normal program stands in |
| Wax | Ceil.machine | 102.25 ms | 616.83 µs | 100.93 ms | 103.17 ms | 3.2 MB | 1.8 KB | 159.46 µs cold, 333 ns warm; 2.76 ms as a whole process | 984 B counted by Wax; 664 B compiled; the Normal program stands in |
| Wax | Ceil.program | 98.23 ms | 230.39 µs | 97.97 ms | 98.39 ms | 2.9 MB | 1.8 KB | 141.83 µs cold, 208 ns warm; 2.63 ms as a whole process | 984 B counted by Wax; 664 B compiled; the Normal program stands in |
| Wax | Ceil.machine.program | 103.47 ms | 240.77 µs | 103.05 ms | 104.15 ms | 3.0 MB | 1.8 KB | 131.75 µs cold, 250 ns warm; 2.62 ms as a whole process | 984 B counted by Wax; 664 B compiled; the Normal program stands in |
| Luau (interpreter) | Ceil.source | 210.35 ms | 1.99 ms | 204.82 ms | 212.95 ms | 4.8 MB | 1.7 KB | 5.20 ms as a whole process | the Normal program stands in |
LuaJIT -joff | Ceil.source | 146.74 ms | 483.33 µs | 146.08 ms | 145.50 ms | 2.0 MB | 1.7 KB | 2.52 ms as a whole process | the Normal program stands in |
| LuaJIT (JIT) | Ceil.source | 48.84 ms | 305.95 µs | 48.30 ms | 48.40 ms | 2.3 MB | 1.7 KB | 2.48 ms as a whole process | the Normal program stands in |
Node --jitless | Ceil.source | 155.87 ms | 664.31 µs | 154.77 ms | 157.63 ms | 45.5 MB | 1.7 KB | 19.51 ms as a whole process | the Normal program stands in |
| Node (JIT), from cold | Ceil.source | 14.17 ms | 82.52 µs | 14.10 ms | 15.73 ms | 52.2 MB | 1.7 KB | 19.11 ms as a whole process | the Normal program stands in |
| Node (JIT), warmed up | Ceil.source | 14.74 ms | 110.09 µs | 14.56 ms | 16.39 ms | 52.3 MB | 1.7 KB | 19.71 ms as a whole process | the Normal program stands in |
Java -Xint | Ceil.source | 123.11 ms | 483.89 µs | 122.46 ms | 126.01 ms | 51.2 MB | 1.7 KB | 16.95 ms as a whole process | the Normal program stands in |
| Java (JIT), warmed up | Ceil.source | 12.77 ms | 183.75 µs | 12.41 ms | 18.59 ms | 82.0 MB | 1.7 KB | 17.92 ms as a whole process | the 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.
| Engine | Kind | Mean | Deviation | Least | First run | Peak memory | Program | Load | Notes |
|---|---|---|---|---|---|---|---|---|---|
| Wax | Purpose | 60.00 ms | 193.01 µs | 59.52 ms | 60.70 ms | 4.4 MB | 533 B | 113.67 µs cold, 500 ns warm; 2.51 ms as a whole process | 793.6 KB counted by Wax; 328 B compiled |
| Luau (interpreter) | Purpose | 62.39 ms | 197.25 µs | 62.15 ms | 62.56 ms | 4.8 MB | 540 B | 5.18 ms as a whole process | |
LuaJIT -joff | Purpose | 29.53 ms | 149.64 µs | 29.25 ms | 30.58 ms | 2.2 MB | 540 B | 2.48 ms as a whole process | |
| LuaJIT (JIT) | Purpose | 5.27 ms | 224.59 µs | 5.06 ms | 5.20 ms | 2.4 MB | 540 B | 3.18 ms as a whole process | |
Node --jitless | Purpose | 239.34 ms | 1.52 ms | 237.47 ms | 252.52 ms | 48.8 MB | 514 B | 18.68 ms as a whole process | |
| Node (JIT), from cold | Purpose | 87.63 ms | 25.03 ms | 65.40 ms | 91.04 ms | 52.8 MB | 514 B | 18.79 ms as a whole process | |
| Node (JIT), warmed up | Purpose | 66.11 ms | 417.98 µs | 65.70 ms | 88.47 ms | 52.6 MB | 514 B | 19.29 ms as a whole process | |
Java -Xint | Purpose | 1946.28 ms | 6.97 ms | 1933.40 ms | 1960.23 ms | 53.8 MB | 588 B | 16.93 ms as a whole process | |
| Java (JIT), warmed up | Purpose | 35.89 ms | 586.64 µs | 35.13 ms | 63.57 ms | 156.8 MB | 588 B | 17.33 ms as a whole process | |
| Wax | Normal | 24.79 ms | 60.02 µs | 24.72 ms | 24.76 ms | 4.2 MB | 538 B | 129.38 µs cold, 417 ns warm; 2.64 ms as a whole process | 625.5 KB counted by Wax; 288 B compiled |
| Luau (interpreter) | Normal | 30.28 ms | 108.68 µs | 30.13 ms | 30.18 ms | 6.0 MB | 478 B | 4.98 ms as a whole process | |
LuaJIT -joff | Normal | 32.00 ms | 501.99 µs | 31.05 ms | 29.46 ms | 3.0 MB | 478 B | 2.41 ms as a whole process | |
| LuaJIT (JIT) | Normal | 12.21 ms | 636.24 µs | 11.30 ms | 13.10 ms | 3.4 MB | 478 B | 2.34 ms as a whole process | |
Node --jitless | Normal | 52.71 ms | 361.15 µs | 52.37 ms | 54.11 ms | 56.6 MB | 477 B | 18.67 ms as a whole process | |
| Node (JIT), from cold | Normal | 35.52 ms | 374.90 µs | 35.11 ms | 36.12 ms | 62.5 MB | 477 B | 20.55 ms as a whole process | |
| Node (JIT), warmed up | Normal | 35.23 ms | 242.52 µs | 34.94 ms | 36.91 ms | 88.5 MB | 477 B | 19.07 ms as a whole process | |
Java -Xint | Normal | 840.43 ms | 35.83 ms | 807.67 ms | 817.50 ms | 54.2 MB | 527 B | 17.67 ms as a whole process | |
| Java (JIT), warmed up | Normal | 14.93 ms | 268.92 µs | 14.50 ms | 37.03 ms | 159.5 MB | 527 B | 19.51 ms as a whole process | |
| Wax | Ceil.source | 25.89 ms | 631.71 µs | 25.29 ms | 28.75 ms | 4.2 MB | 538 B | 113.88 µs cold, 458 ns warm; 2.91 ms as a whole process | 625.5 KB counted by Wax; 288 B compiled; the Normal program stands in |
| Wax | Ceil.machine | 25.67 ms | 413.35 µs | 25.14 ms | 27.12 ms | 4.5 MB | 538 B | 120.42 µs cold, 334 ns warm; 3.03 ms as a whole process | 625.5 KB counted by Wax; 288 B compiled; the Normal program stands in |
| Wax | Ceil.program | 23.72 ms | 436.54 µs | 23.24 ms | 24.77 ms | 4.3 MB | 538 B | 118.67 µs cold, 250 ns warm; 2.85 ms as a whole process | 625.5 KB counted by Wax; 288 B compiled; the Normal program stands in |
| Wax | Ceil.machine.program | 22.91 ms | 58.19 µs | 22.79 ms | 23.32 ms | 4.0 MB | 538 B | 96.42 µs cold, 250 ns warm; 2.68 ms as a whole process | 625.5 KB counted by Wax; 288 B compiled; the Normal program stands in |
| Luau (interpreter) | Ceil.source | 30.23 ms | 110.52 µs | 30.07 ms | 29.66 ms | 6.0 MB | 478 B | 5.30 ms as a whole process | the Normal program stands in |
LuaJIT -joff | Ceil.source | 31.44 ms | 746.22 µs | 30.41 ms | 30.55 ms | 3.0 MB | 478 B | 2.60 ms as a whole process | the Normal program stands in |
| LuaJIT (JIT) | Ceil.source | 12.70 ms | 1.21 ms | 11.00 ms | 12.69 ms | 3.4 MB | 478 B | 2.61 ms as a whole process | the Normal program stands in |
Node --jitless | Ceil.source | 53.60 ms | 547.52 µs | 52.70 ms | 54.65 ms | 56.6 MB | 477 B | 19.92 ms as a whole process | the Normal program stands in |
| Node (JIT), from cold | Ceil.source | 36.33 ms | 504.79 µs | 35.74 ms | 37.76 ms | 62.5 MB | 477 B | 21.36 ms as a whole process | the Normal program stands in |
| Node (JIT), warmed up | Ceil.source | 37.16 ms | 1.06 ms | 35.45 ms | 37.51 ms | 88.7 MB | 477 B | 19.78 ms as a whole process | the Normal program stands in |
Java -Xint | Ceil.source | 853.77 ms | 29.92 ms | 810.11 ms | 840.38 ms | 51.6 MB | 527 B | 18.16 ms as a whole process | the Normal program stands in |
| Java (JIT), warmed up | Ceil.source | 15.57 ms | 367.96 µs | 15.04 ms | 35.44 ms | 159.3 MB | 527 B | 19.94 ms as a whole process | the 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.
| Engine | Kind | Mean | Deviation | Least | First run | Peak memory | Program | Load | Notes |
|---|---|---|---|---|---|---|---|---|---|
| Wax | Purpose | 311.82 µs | 13.62 µs | 300.75 µs | 331.42 µs | 3.2 MB | 215 B | 84.62 µs cold, 417 ns warm; 2.84 ms as a whole process | 64.6 KB counted by Wax; 96 B compiled |
| Luau (interpreter) | Purpose | 155.26 ms | 12.87 ms | 145.34 ms | 148.83 ms | 11.2 MB | 195 B | 5.83 ms as a whole process | |
LuaJIT -joff | Purpose | 32.80 ms | 500.29 µs | 32.34 ms | 32.56 ms | 3.7 MB | 195 B | 2.59 ms as a whole process | |
| LuaJIT (JIT) | Purpose | 21.64 ms | 433.17 µs | 20.84 ms | 20.93 ms | 3.8 MB | 195 B | 2.82 ms as a whole process | |
Node --jitless | Purpose | 410.80 µs | 161.03 µs | 248.21 µs | 1.08 ms | 52.7 MB | 223 B | 20.93 ms as a whole process | |
| Node (JIT), from cold | Purpose | 214.43 µs | 151.15 µs | 82.71 µs | 889.33 µs | 57.8 MB | 223 B | 19.22 ms as a whole process | |
| Node (JIT), warmed up | Purpose | 148.77 µs | 121.26 µs | 69.79 µs | 940.71 µs | 57.9 MB | 223 B | 19.03 ms as a whole process | |
Java -Xint | Purpose | 104.08 ms | 2.96 ms | 102.46 ms | 124.69 ms | 398.8 MB | 234 B | 17.89 ms as a whole process | |
| Java (JIT), warmed up | Purpose | 26.43 ms | 246.34 µs | 26.10 ms | 52.24 ms | 1 GB | 234 B | 18.32 ms as a whole process | |
| Wax | Normal | 348.19 µs | 7.41 µs | 341.58 µs | 366.50 µs | 3.4 MB | 182 B | 96.21 µs cold, 458 ns warm; 2.68 ms as a whole process | 128.6 KB counted by Wax; 80 B compiled |
| Luau (interpreter) | Normal | 177.96 ms | 20.13 ms | 165.61 ms | 165.57 ms | 12.8 MB | 138 B | 5.10 ms as a whole process | |
LuaJIT -joff | Normal | 43.27 ms | 329.59 µs | 42.60 ms | 43.20 ms | 5.2 MB | 138 B | 2.55 ms as a whole process | |
| LuaJIT (JIT) | Normal | 20.17 ms | 282.35 µs | 19.67 ms | 24.15 ms | 5.4 MB | 138 B | 2.49 ms as a whole process | |
Node --jitless | Normal | 508.81 µs | 347.49 µs | 277.42 µs | 1.34 ms | 61.6 MB | 155 B | 19.22 ms as a whole process | |
| Node (JIT), from cold | Normal | 499.18 µs | 485.64 µs | 112.08 µs | 1.49 ms | 65.2 MB | 155 B | 19.09 ms as a whole process | |
| Node (JIT), warmed up | Normal | 286.07 µs | 319.09 µs | 124.71 µs | 1.05 ms | 69.3 MB | 155 B | 19.56 ms as a whole process | |
Java -Xint | Normal | 116.61 ms | 1.71 ms | 114.71 ms | 135.59 ms | 399.1 MB | 169 B | 17.83 ms as a whole process | |
| Java (JIT), warmed up | Normal | 33.65 ms | 2.05 ms | 32.40 ms | 57.19 ms | 1 GB | 169 B | 18.05 ms as a whole process | |
| Wax | Ceil.source | 356.09 µs | 8.23 µs | 344.88 µs | 384.12 µs | 3.5 MB | 182 B | 94.12 µs cold, 333 ns warm; 2.96 ms as a whole process | 128.6 KB counted by Wax; 80 B compiled; the Normal program stands in |
| Wax | Ceil.machine | 357.10 µs | 9.80 µs | 347.88 µs | 408.00 µs | 3.4 MB | 182 B | 2.13 ms cold, 750 ns warm; 2.79 ms as a whole process | 128.6 KB counted by Wax; 80 B compiled; the Normal program stands in |
| Wax | Ceil.program | 295.67 µs | 7.77 µs | 287.79 µs | 511.79 µs | 3.2 MB | 182 B | 1.95 ms cold, 750 ns warm; 2.86 ms as a whole process | 128.6 KB counted by Wax; 80 B compiled; the Normal program stands in |
| Wax | Ceil.machine.program | 295.51 µs | 6.11 µs | 286.25 µs | 478.25 µs | 3.2 MB | 182 B | 1.83 ms cold, 1.04 µs warm; 2.74 ms as a whole process | 128.6 KB counted by Wax; 80 B compiled; the Normal program stands in |
| Luau (interpreter) | Ceil.source | 177.21 ms | 37.56 ms | 164.26 ms | 167.62 ms | 12.8 MB | 138 B | 4.98 ms as a whole process | the Normal program stands in |
LuaJIT -joff | Ceil.source | 42.73 ms | 815.57 µs | 42.20 ms | 42.03 ms | 4.9 MB | 138 B | 4.35 ms as a whole process | the Normal program stands in |
| LuaJIT (JIT) | Ceil.source | 22.39 ms | 7.52 ms | 19.73 ms | 28.25 ms | 5.2 MB | 138 B | 2.44 ms as a whole process | the Normal program stands in |
Node --jitless | Ceil.source | 499.08 µs | 334.35 µs | 266.17 µs | 1.10 ms | 61.7 MB | 155 B | 19.19 ms as a whole process | the Normal program stands in |
| Node (JIT), from cold | Ceil.source | 492.13 µs | 474.31 µs | 125.25 µs | 1.02 ms | 65.4 MB | 155 B | 18.89 ms as a whole process | the Normal program stands in |
| Node (JIT), warmed up | Ceil.source | 257.99 µs | 321.49 µs | 106.08 µs | 1.05 ms | 69.4 MB | 155 B | 18.99 ms as a whole process | the Normal program stands in |
Java -Xint | Ceil.source | 13.82 ms | 4.48 ms | 11.03 ms | 17.92 ms | 42.5 MB | 322 B | 17.00 ms as a whole process | |
| Java (JIT), warmed up | Ceil.source | 108.99 µs | 67.88 µs | 82.62 µs | 1.50 ms | 53.8 MB | 322 B | 17.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.
| Engine | Kind | Mean | Deviation | Least | First run | Peak memory | Program | Load | Notes |
|---|---|---|---|---|---|---|---|---|---|
| Wax | Purpose | 72.57 ms | 1.11 ms | 71.28 ms | 75.77 ms | 3.2 MB | 519 B | 109.12 µs cold, 333 ns warm; 2.63 ms as a whole process | 65.9 KB counted by Wax; 216 B compiled |
| Luau (interpreter) | Purpose | 108.89 ms | 15.10 ms | 95.12 ms | 95.77 ms | 4.8 MB | 411 B | 5.19 ms as a whole process | |
LuaJIT -joff | Purpose | 120.84 ms | 3.28 ms | 116.61 ms | 118.83 ms | 2.6 MB | 411 B | 2.49 ms as a whole process | |
| LuaJIT (JIT) | Purpose | 99.65 ms | 11.24 ms | 93.99 ms | 94.69 ms | 2.9 MB | 411 B | 4.02 ms as a whole process | |
Node --jitless | Purpose | 76.85 ms | 407.74 µs | 75.98 ms | 80.64 ms | 59.8 MB | 444 B | 18.80 ms as a whole process | |
| Node (JIT), from cold | Purpose | 10.50 ms | 275.12 µs | 10.27 ms | 13.00 ms | 65.8 MB | 444 B | 18.78 ms as a whole process | |
| Node (JIT), warmed up | Purpose | 10.47 ms | 621.99 µs | 10.11 ms | 12.99 ms | 114.9 MB | 444 B | 19.62 ms as a whole process | |
Java -Xint | Purpose | 153.38 ms | 3.38 ms | 148.14 ms | 151.74 ms | 70.1 MB | 595 B | 18.64 ms as a whole process | |
| Java (JIT), warmed up | Purpose | 10.64 ms | 345.67 µs | 10.12 ms | 16.23 ms | 401.8 MB | 595 B | 17.27 ms as a whole process | |
| Wax | Normal | 101.00 ms | 2.70 ms | 98.60 ms | 99.50 ms | 8.8 MB | 956 B | 132.58 µs cold, 458 ns warm; 2.66 ms as a whole process | 4.0 MB counted by Wax; 592 B compiled |
| Luau (interpreter) | Normal | 143.69 ms | 7.16 ms | 132.63 ms | 132.87 ms | 43.3 MB | 799 B | 5.15 ms as a whole process | |
LuaJIT -joff | Normal | 128.37 ms | 1.16 ms | 126.72 ms | 128.11 ms | 39.0 MB | 799 B | 2.36 ms as a whole process | |
| LuaJIT (JIT) | Normal | 83.41 ms | 1.23 ms | 81.13 ms | 82.24 ms | 44.3 MB | 799 B | 2.51 ms as a whole process | |
Node --jitless | Normal | 115.99 ms | 1.73 ms | 114.37 ms | 116.74 ms | 213.4 MB | 878 B | 18.58 ms as a whole process | |
| Node (JIT), from cold | Normal | 14.19 ms | 925.55 µs | 13.27 ms | 17.17 ms | 129.7 MB | 878 B | 18.43 ms as a whole process | |
| Node (JIT), warmed up | Normal | 13.41 ms | 76.48 µs | 13.26 ms | 16.89 ms | 224.0 MB | 878 B | 18.92 ms as a whole process | |
Java -Xint | Normal | 159.48 ms | 2.35 ms | 157.52 ms | 162.33 ms | 86.9 MB | 1.0 KB | 16.98 ms as a whole process | |
| Java (JIT), warmed up | Normal | 10.32 ms | 1.34 ms | 9.55 ms | 17.26 ms | 518.3 MB | 1.0 KB | 18.12 ms as a whole process | |
| Wax | Ceil.source | 103.03 ms | 2.55 ms | 98.77 ms | 102.19 ms | 8.8 MB | 956 B | 142.12 µs cold, 291 ns warm; 2.81 ms as a whole process | 4.0 MB counted by Wax; 592 B compiled; the Normal program stands in |
| Wax | Ceil.machine | 99.45 ms | 574.69 µs | 98.74 ms | 100.17 ms | 8.8 MB | 956 B | 2.67 ms cold, 250 ns warm; 2.84 ms as a whole process | 4.0 MB counted by Wax; 592 B compiled; the Normal program stands in |
| Wax | Ceil.program | 85.29 ms | 264.48 µs | 84.80 ms | 87.28 ms | 8.5 MB | 956 B | 132.00 µs cold, 208 ns warm; 2.69 ms as a whole process | 4.0 MB counted by Wax; 592 B compiled; the Normal program stands in |
| Wax | Ceil.machine.program | 98.42 ms | 1.09 ms | 96.81 ms | 100.53 ms | 8.6 MB | 956 B | 343.12 µs cold, 208 ns warm; 2.72 ms as a whole process | 4.0 MB counted by Wax; 592 B compiled; the Normal program stands in |
| Luau (interpreter) | Ceil.source | 129.97 ms | 2.97 ms | 125.94 ms | 128.45 ms | 42.0 MB | 799 B | 5.29 ms as a whole process | the Normal program stands in |
LuaJIT -joff | Ceil.source | 129.93 ms | 2.04 ms | 127.31 ms | 127.95 ms | 39.5 MB | 799 B | 2.60 ms as a whole process | the Normal program stands in |
| LuaJIT (JIT) | Ceil.source | 82.03 ms | 967.06 µs | 81.23 ms | 81.45 ms | 43.0 MB | 799 B | 2.51 ms as a whole process | the Normal program stands in |
Node --jitless | Ceil.source | 112.83 ms | 1.88 ms | 111.14 ms | 116.22 ms | 213.5 MB | 878 B | 18.50 ms as a whole process | the Normal program stands in |
| Node (JIT), from cold | Ceil.source | 14.32 ms | 942.14 µs | 13.44 ms | 17.15 ms | 129.8 MB | 878 B | 19.00 ms as a whole process | the Normal program stands in |
| Node (JIT), warmed up | Ceil.source | 13.73 ms | 684.94 µs | 13.26 ms | 17.14 ms | 224.1 MB | 878 B | 19.21 ms as a whole process | the Normal program stands in |
Java -Xint | Ceil.source | 166.41 ms | 18.40 ms | 157.00 ms | 164.88 ms | 86.8 MB | 1.0 KB | 17.91 ms as a whole process | the Normal program stands in |
| Java (JIT), warmed up | Ceil.source | 9.82 ms | 273.48 µs | 9.57 ms | 17.70 ms | 518.7 MB | 1.0 KB | 20.06 ms as a whole process | the 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.
| Engine | Kind | Load, each from its own text | Load, each from the same text | Load, each from a compiled file (D141) | Resume, each | Call, each | Memory, each script | Peak memory | Notes |
|---|---|---|---|---|---|---|---|---|---|
| Wax | Purpose | 76.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 B | 4.3 MB | counted by Wax |
| Luau (interpreter) | Purpose | 13.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 KB | 4.8 MB | the engine's own heap |
LuaJIT -joff | Purpose | 3.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 KB | 1.9 MB | the engine's own heap |
| LuaJIT (JIT) | Purpose | 3.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 KB | 2.2 MB | the engine's own heap |
Node --jitless | Purpose | 34.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 B | 45.9 MB | the engine's own heap |
| Node (JIT) | Purpose | 40.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 B | 53.2 MB | the engine's own heap |
| Wax | Normal | 4.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 B | 10.3 MB | counted by Wax |
| Luau (interpreter) | Normal | 5.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 KB | 6.3 MB | the engine's own heap |
LuaJIT -joff | Normal | 1.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 KB | 5.2 MB | the engine's own heap |
| LuaJIT (JIT) | Normal | 1.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 KB | 6.0 MB | the engine's own heap |
Node --jitless | Normal | 1.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 B | 48.8 MB | the engine's own heap |
| Node (JIT) | Normal | 1.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 B | 56.1 MB | the engine's own heap |
| Wax | Ceil.source | 4.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 B | 10.3 MB | counted by Wax; the Normal program stands in |
| Wax | Ceil.machine | 4.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 B | 10.3 MB | counted by Wax; the Normal program stands in |
| Wax | Ceil.program | 3.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 B | 10.1 MB | counted by Wax; the Normal program stands in |
| Wax | Ceil.machine.program | 3.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 B | 10.1 MB | counted by Wax; the Normal program stands in |
| Luau (interpreter) | Ceil.source | 4.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 KB | 6.3 MB | the engine's own heap; the Normal program stands in |
LuaJIT -joff | Ceil.source | 1.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 KB | 5.2 MB | the engine's own heap; the Normal program stands in |
| LuaJIT (JIT) | Ceil.source | 1.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 KB | 6.1 MB | the engine's own heap; the Normal program stands in |
Node --jitless | Ceil.source | 1.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 B | 48.8 MB | the engine's own heap; the Normal program stands in |
| Node (JIT) | Ceil.source | 1.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 B | 56.0 MB | the 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).
| Benchmark | With every check | Without the-float-check |
|---|---|---|
fib(32), recursive | 30.96 ms | 31.68 ms (+2.3%) |
| n-body, 100,000 steps | 52.97 ms | 48.79 ms (-7.9%) |
| spectral-norm, size 200 | 19.77 ms | 17.44 ms (-11.8%) |
| fannkuch-redux, 9 | 102.23 ms | 109.35 ms (+7.0%) |
| word count, 500,000 words | 25.93 ms | 26.14 ms (+0.8%) |
| text building, 20,000 joins | 366.14 µs | 375.72 µs (+2.6%) |
| binary-trees, depth 14 | 103.66 ms | 108.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.
| Program | Wax mean | Wax deviation | Wax least | Wax peak memory | Python mean | Python least | gmpy2 mean |
|---|---|---|---|---|---|---|---|
HugeWhole: 3000 factorial, 9,131 digits | 1.58 ms | 293.02 µs | 1.36 ms | 3.9 MB | 1.61 ms | 1.58 ms | 318.23 µs |
HugeWhole: an idle game's gold over 20,000 ticks, upgrades doubling it, 604 digits | 1.41 ms | 28.39 µs | 1.39 ms | 3.7 MB | 1.56 ms | 1.52 ms | 1.12 ms |
Decimal: 1,000,000 prices summed with tax, then split three ways | 114.20 ms | 299.32 µs | 113.92 ms | 3.1 MB | 176.79 ms | 163.55 ms | – |
Decimal: 1,000,000 days of interest compounding, a cent put in each day | 73.79 ms | 1.67 ms | 72.70 ms | 3.1 MB | 86.95 ms | 83.74 ms | – |
HugeDecimal: 2,000 years of exact 5% interest, 4,048 digits | 452.99 µs | 9.03 µs | 445.46 µs | 3.7 MB | 942.22 µs | 908.17 µs | – |
HugeDecimal: the money sums, kept exactly | 97.57 ms | 3.08 ms | 92.05 ms | 3.1 MB | 165.46 ms | 163.98 ms | – |
the money sums in Floats, as a yardstick | 10.58 ms | 202.61 µs | 10.24 ms | 3.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.
| Engine | Door written in | Each call | Notes |
|---|---|---|---|
| Wax | C | 15 ns | |
| Wax | Rust | 8 ns | |
LuaJIT -joff | C | 7 ns | |
| LuaJIT (JIT) | C | 8 ns |