Bun v1.3.11
5 MB
99.11 MB
→
94.62 MB
linux x64
CMake link template
<CXX> <FLAGS> <LINK_FLAGS>
<FLAGS> = CMAKE_CXX_FLAGS
that included
-O3
in the link step
CMake was
smuggling
a compile flag
into the link.
new TS build → explicit ldflags only
lld default
| link-time -O3 |
| Linux | → -plugin-opt=O3 |
| macOS | discarded |
| Windows | never forwarded |
only ELF clang driver forwards it to LTO
llvm/LTO/Config.h:60
OptLevel = 2;
lld hardcoded default
Where did
4.94 MB
of .text go?
same function count — just smaller bodies
Yarr Unicode tables — 1.48 MB (30%)
JIT internals — 0.70 MB
once-per-VM init — 0.50 MB
createCharacterClass367
KB — one regex table
Runs when you use
\p{…}
(almost never)
one actually-hot function moved
NodeHTTPServer__onRequest
O3 inlined slow-path alloc
11×
into the hot loop
O2 → fits L1i.
| target | v1.3.10 | v1.3.11 | Δ |
| linux-x64 | 99.11 | 94.62 | 4.49 |
| linux-x64-baseline | 98.75 | 93.81 | 4.94 |
| linux-aarch64 | 96.71 | 94.08 | 2.63 |
| darwin-aarch64 | 58.11 | 58.13 | — |
| windows-x64 | 109.45 | 109.98 | — |