Finding
After #599 removed serial FNV, exact-current-main sampling still finds managed concatenation results paying deterministic XXH3 during every StringCell construction. The dedicated representative string workload samples contentHash/XXH3 repeatedly but records no StringCell.eql leaf: most temporary results are sliced, indexed, or discarded without ever consuming their content hash. #600 showed that fusing adjacent scans is neutral on isolated strings, so the next target is removing unconsumed hash work rather than rearranging it.
Scope
- Keep ASCII/Latin-1 classification eager because representation and O(1) readers consume it.
- Mark uninterned runtime cells as hash-pending in the existing 64-bit metadata word; do not grow
StringCell. - Compute and atomically publish deterministic XXH3 on the first same-classification/same-length string equality. Concurrent readers may race to derive the same value but must publish one exact state without locks or data races.
- Keep static literals and intern-table cells eagerly hashed because compile-time equality and shard selection consume their hashes.
- Keep exact bytes authoritative after every hash comparison and preserve canonical WTF-8/flat-storage compatibility.
Security and correctness
- Length/classification rejection stays O(1). A same-length comparison computes each pending hash at most once, so repeated adversarial comparisons do not repeatedly rescan either cell.
- No hash-only equality, randomized semantic identity, mutable bytes, allocation, lock, process-global cache, or deferred work outside Context teardown.
- Add direct race, collision, static-vs-runtime, interned-vs-runtime, GC relocation, moving-GC, OOM, and bounded-heap witnesses.
Acceptance
@sizeOf(StringCell)remains 32 bytes and no allocation/GC inventory grows.- Focused normal and TSan concurrency tests prove deterministic first-use publication and exact collision handling.
- Exact-parent representative string and cold-lifecycle profiles show the constructor hash leaves removed without moving equivalent work elsewhere.
- String/RegExp/JSON/Temporal test262 and the full sharded unit suite have zero flips/regressions.