Problem
After #572 and #573, Intl.DateTimeFormat.prototype.formatRange(x, x) still builds the same formatted endpoint twice and then discovers that every emitted value is equal. formatRangeToParts(x, x) likewise duplicates the structural build before returning the first endpoint with source: "shared".
The retained representative controls intentionally use equal endpoints and currently attribute, at 100 jobs:
- range text: checksum
552787875, 460,782 cumulative backing allocations, 90,431,085 backing bytes, 234,716 GC cells, 8 collections; - range parts: checksum
789386393, 3,651,166 cumulative backing allocations, 480,804,917 backing bytes, 2,025,117 GC cells, 73 collections.
Scope
- Preserve the specified left-to-right conversion of both arguments before any identity decision.
- Recognize only identical canonical legacy time values and identical immutable Temporal object identities as a one-endpoint case.
- Build direct text once for
formatRangeand structural parts once forformatRangeToPartsin that case. - Retain the existing two-endpoint structural comparison for distinct values that merely format alike or need interval collapse.
- Preserve TimeClip errors, Temporal kind/calendar checks, part boundaries/source attribution, OOM propagation, moving-GC safety, and read-only no-GIL sharing.
- Measure exact-parent text/parts controls and run DateTimeFormat plus Temporal conformance, focused normal/TSan/no-GIL, and full units.
Out of scope
- New CLDR interval patterns or collapse rules.
- Value comparison across distinct Temporal objects.
- Promise/microtask/Worker/job lifecycle work.