| @@ -38,7 +38,7 @@ Louise is **pre-alpha**: the language and its standard library still change. |
| 38 | 38 | |
| 39 | 39 | ## Performance |
| 40 | 40 | |
| 41 | | −Three small programs, written idiomatically in each language ([`tests/compare`](tests/compare), run by `scripts/compare.sh`; every toolchain is pinned by [`tests/compare/Containerfile`](tests/compare/Containerfile)). Each prints the same number. **Instructions** are the stable signal where wall clock varies on a shared machine; wall clock is best of 5 runs. |
| 41 | +Four small programs, written idiomatically in each language ([`tests/compare`](tests/compare), run by `scripts/compare.sh`; every toolchain is pinned by [`tests/compare/Containerfile`](tests/compare/Containerfile)). Each prints the same number. **Instructions** are the stable signal where wall clock varies on a shared machine; wall clock is best of 5 runs. |
| 42 | 42 | |
| 43 | 43 | ### `lists`: a map/filter/fold pipeline over a million integers, ten times |
| 44 | 44 | |
| @@ -47,7 +47,7 @@ Three small programs, written idiomatically in each language ([`tests/compare`]( |
| 47 | 47 | | Haskell (GHC) | 0.05 s | 0.22G | 3 MB | 956 KB | |
| 48 | 48 | | Go | 0.08 s | 0.27G | 33 MB | 1.5 MB | |
| 49 | 49 | | Rust | 0.11 s | 0.15G | 17 MB | 337 KB | |
| 50 | | −| **Louise** | **0.34 s** | **2.87G** | **36 MB** | **470 KB** | |
| 50 | +| **Louise** | **0.33 s** | **2.66G** | **36 MB** | **470 KB** | |
| 51 | 51 | | Java | 0.95 s | 12.27G | 472 MB | runtime | |
| 52 | 52 | | Node | 1.37 s | 10.37G | 140 MB | runtime | |
| 53 | 53 | | Python | 1.58 s | 10.46G | 130 MB | runtime | |
| @@ -61,7 +61,7 @@ Three small programs, written idiomatically in each language ([`tests/compare`]( |
| 61 | 61 | | Go | 0.07 s | 0.43G | 2 MB | 1.5 MB | |
| 62 | 62 | | Haskell (GHC) | 0.07 s | 0.42G | 3 MB | 956 KB | |
| 63 | 63 | | Java | 0.10 s | 0.46G | 36 MB | runtime | |
| 64 | | −| **Louise** | **0.15 s** | **1.44G** | **6 MB** | **460 KB** | |
| 64 | +| **Louise** | **0.14 s** | **1.40G** | **6 MB** | **459 KB** | |
| 65 | 65 | | Node | 0.32 s | 1.90G | 56 MB | runtime | |
| 66 | 66 | | Gleam (on node) | 0.36 s | 2.06G | 58 MB | runtime | |
| 67 | 67 | | Python | 1.59 s | 15.81G | 8 MB | runtime | |
| @@ -72,19 +72,32 @@ Three small programs, written idiomatically in each language ([`tests/compare`]( |
| 72 | 72 | |---|---:|---:|---:|---:| |
| 73 | 73 | | Haskell (GHC) | 0.16 s | 0.99G | 7 MB | 957 KB | |
| 74 | 74 | | Java | 0.27 s | 1.05G | 148 MB | runtime | |
| 75 | | −| **Louise** | **0.30 s** | **2.31G** | **8 MB** | **468 KB** | |
| 75 | +| **Louise** | **0.30 s** | **2.32G** | **8 MB** | **467 KB** | |
| 76 | 76 | | Rust | 0.68 s | 5.69G | 5 MB | 337 KB | |
| 77 | 77 | | Go | 0.80 s | 6.08G | 12 MB | 1.5 MB | |
| 78 | 78 | | Node | 0.48 s | 2.61G | 85 MB | runtime | |
| 79 | 79 | | Python | 2.46 s | 22.82G | 12 MB | runtime | |
| 80 | 80 | | Gleam (on node) | 5.36 s | 39.42G | 197 MB | runtime | |
| 81 | 81 | |
| 82 | | −A release build of hello world is 395 KB: a static executable with the actor scheduler, the allocator and the runtime ([ADR 0042](docs/adr/0042-smaller-release-binaries.md)). |
| 82 | +### `floats`: arithmetic in a loop, three million times |
| 83 | + |
| 84 | +| language | wall | instructions | peak memory | executable (stripped) | |
| 85 | +|---|---|---:|---:|---:| |
| 86 | +| **Louise** | **0.00 s** | **0.03G** | **6 MB** | **409 KB** | |
| 87 | +| Rust | 0.00 s | 0.04G | 1 MB | 365 KB | |
| 88 | +| Haskell (GHC) | 0.00 s | 0.02G | 3 MB | 1.2 MB | |
| 89 | +| Node | 0.16 s | 0.42G | 59 MB | runtime | |
| 90 | +| Python | 0.52 s | 4.95G | 9 MB | runtime | |
| 91 | + |
| 92 | +Before the unboxing milestone (#190) the same loop took 653M instructions and 83 ms: every `+` allocated a heap block. |
| 93 | + |
| 94 | +A release build of hello world is 386 KB: a static executable with the actor scheduler, the allocator and the runtime ([ADR 0042](docs/adr/0042-smaller-release-binaries.md)). |
| 83 | 95 | |
| 84 | 96 | What the numbers say: |
| 97 | +- **Calls and arithmetic:** Louise is about 4–5× slower than Rust and 2× slower than GHC on a call-heavy loop, and faster than Node. This milestone (#190–#193) cut `fib`'s instructions by 3% and `arith`'s by 26% — preemption is now counted only where a function can loop, and provably-small integer arithmetic skips its checks; the rest of the gap is the tagged value representation. Devirtualising trait calls (#192) is next. |
| 98 | +- **Float arithmetic:** a float loop's arithmetic runs on raw doubles, allocating nothing — **Louise runs it in fewer instructions than Rust**, and an order of magnitude fewer than Node. Until #190 every `+` allocated a heap block (the same loop: 653M instructions, 83 ms). |
| 85 | 99 | - **List pipelines:** the Core optimiser (#195–#200) fuses `range |> map |> filter |> fold` into one loop that allocates nothing per element — against the pre-optimiser build, the pipeline is 26% fewer instructions, 23% less wall clock, and uses **45% less peak memory** (the intermediate lists are gone). Louise is now ahead of Node and Python by a wide margin and closes on Rust and GHC; they use arrays and fusion respectively. `std/iter`'s lazy iterators do the same without rewrite rules (#199). |
| 86 | 100 | - **Allocation-heavy code:** reference counting with in-place reuse (Perceus) is faster than Rust's `Box` with the system allocator and close to GHC's garbage collector, in a fraction of Node's memory — and with a fraction of the instructions of everything but Haskell. |
| 87 | | −- **Calls and arithmetic:** Louise is about 4× slower than Rust and 2× slower than GHC, and faster than Node. Every call pays for preemption checks and a uniform calling convention (#191); unboxing `Float` (#190) and devirtualising trait calls further (#192) are the next milestone. |
| 88 | 101 | |
| 89 | 102 | Measured on 2026-10-15, in the pinned container ([`tests/compare/Containerfile`](tests/compare/Containerfile)), on one machine: Intel Core Ultra 7 155H. Instructions are user-space, counted once per program; wall clock is best of 5. Small programs show orders of magnitude, not a ranking. |
| 90 | 103 | |