Files
scriptc/packages/compiler
Malte Ubl f6ca589404 Keep the allocation paths' per-thread state in one thread-local block
In worker executables the small-object allocator state, the collector's
live and old-freed counts and the weak dispose hook were four separate
thread-locals, and every allocation or free touched them all. On
Darwin each distinct thread-local costs a _tlv_get_addr call per
function, so a runtime free made four such calls.

They now share one ScrThreadHot block (macros keep the runtime sources
unchanged; ordinary and library builds keep separate globals). The
emitted inline paths address the fields at fixed offsets from a single
llvm.threadlocal.address, which LLVM shares across a function.

tsc-ts self-check, macOS, Worker build vs non-worker build: 1.12x ->
1.10x.
2026-10-09 17:43:51 -07:00
..
2026-07-22 18:08:04 -05:00
2026-10-08 21:18:31 -05:00
2026-10-08 21:18:31 -05:00