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-10-08 11:00:13 -05:00
2026-10-09 17:43:51 -07:00
2026-10-06 01:05:40 -05:00
2026-10-07 04:21:51 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-06 22:19:41 -05:00
2026-10-06 22:19:41 -05:00
2026-10-08 11:00:13 -05:00
2026-10-09 11:59:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-08 11:00:13 -05:00
2026-10-08 11:00:13 -05:00
2026-10-07 13:55:11 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-06 01:05:40 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-08 11:00:13 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-08 11:00:13 -05:00
2026-10-08 11:00:13 -05:00
2026-10-07 11:47:54 -05:00
2026-10-08 15:44:26 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-09 11:59:28 -05:00
2026-10-05 17:51:24 -05:00
2026-09-29 20:54:09 -05:00
2026-10-08 11:00:13 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-08 15:05:00 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-08 11:00:13 -05:00
2026-10-09 11:59:28 -05:00
2026-10-08 15:36:07 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-08 11:00:13 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-08 11:00:13 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-07 15:39:05 -05:00
2026-10-05 17:51:24 -05:00
2026-10-09 10:33:07 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-07 08:15:08 -05:00
2026-10-07 01:57:01 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-08 11:00:13 -05:00
2026-10-09 11:59:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-07 04:21:51 -05:00
2026-10-09 14:27:41 -05:00
2026-10-05 17:51:24 -05:00
2026-10-05 17:51:24 -05:00
2026-10-09 17:43:51 -07:00