Parent: #475 Related benchmark/evidence: #460
Problem
Intl.PluralRules performs its observable option reads at construction but stores the normalized record in a hidden ordinary object. select repeatedly rereads locale, type, notation, and fraction digits; resolvedOptions re-traverses the full digit/rounding record and rebuilds category selection from generic properties.
The existing representative_intl_plural_rules_select boundary keeps formatters outside the timed region and executes 102,400 warmed selections across cardinal/ordinal locales and numeric shapes. Current zig-js and system JSC agree on checksum 691593768. Exact-parent zig-js attribution for one 100-job invocation is:
- property-lock acquisitions:
6,234,947 - backing allocations:
2,655,989/445,942,486bytes - current backing:
154,523,693bytes; peak:158,552,573bytes - GC cells:
1,325,990; collections:53
Single diagnostic samples were 705.7 ms in zig-js and 62.9 ms in system JSC; these are diagnostic only, not publication evidence.
Scope
- Publish owned locale plus closed type/notation/compact-display/digit/rounding/trailing-zero fields into one immutable native record after the complete existing observable option-read sequence.
- Make
select,selectRange, category lookup, andresolvedOptionsconsume only that record and use its native slot as the receiver brand. - Preserve option getter/coercion/error order, resolvedOptions key presence/order/defaults, plural-category order, numeric coercion, and current selection semantics.
- Account/finalize the record through the bounded backing allocator; cover OOM, bounded heap, moving GC, and concurrent read safety.
- Compare exact-parent select and resolved-category benchmark rows at frozen checksums.
Acceptance
- No hidden ordinary options bag remains on newly constructed PluralRules objects.
- Focused PluralRules/test262, Intl402, OOM, GC movement, concurrent read, TSan, and full unit gates pass.
- Exact-parent comparison reports checksum equality and quantified retained changes; retain only a real improvement.
- No ICU/system-JSC runtime dependency, global mutable cache, skipped observable hook, or repro-specific shortcut.