wip(assembler): round L4 -- lazy per-thread caches: 17.3 MiB -> 43 KiB per thread, view 7% faster

VoxelForgeCoreThreadLocal::FLazy<T> (new public header ThreadLocalStorage.h) makes every large
thread_local cache a pointer that heap-allocates on that thread's first use (still worker-private,
lock-free). Static TLS 17.33 MiB -> 43 KiB (initialised image 5.8 MiB -> 21 KiB); worker start
5.2 -> 0.12 ms; idle worker RSS 17.7 MiB -> 52 KiB. Linux workers back to 8 MiB stacks.
World unchanged (L1 hashes Clang off/GCC default, W1/W12; FloatingIslands seed 0).
Reviewer interleaved W12: 2.256 -> 2.091 s. MSVC/UBT not compiled here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ED33VnqepD4YY6gDAAA832
This commit is contained in:
Fr0zkaandClaude Opus 5.5 committed 2026-10-19 19:16:14 +02:00
1 parent 046f2af495
commit 7770074503
15 files changed
+361 -48

No files matched your search

+3 -3
View File
@@ -12,13 +12,13 @@
#include <pthread.h>
#endif
// Linux's static TLS image is larger than the default pthread stack in this standalone build.
// Give only host-owned generation workers enough stack for that TLS plus normal call frames.
// Keep host-owned Linux workers on the ordinary 8 MiB stack size. Core's large caches now live
// behind lazy thread-local handles, so they no longer need to be hidden by oversized stacks.
#if defined(__linux__)
class FStandaloneWorkerThread
{
public:
static constexpr std::size_t StackSizeBytes=32u*1024u*1024u;
static constexpr std::size_t StackSizeBytes=8u*1024u*1024u;
FStandaloneWorkerThread()=default;