Skip to content

[TS] Evaluate a higher capacity for tracked Array.map - #685

Draft
CaelmBleidd wants to merge 1 commit into
caelmbleidd/ts-collection-iterators-callbacksfrom
caelmbleidd/ts-map-capacity-experiment
Draft

CaelmBleidd wants to merge 1 commit into
caelmbleidd/ts-collection-iterators-callbacksfrom
caelmbleidd/ts-map-capacity-experiment

Conversation

@CaelmBleidd

Copy link
Copy Markdown
Member

Scope

Evaluate a 64-element limit for modeled Array.map when the receiver has a concrete length and tracked own slots. The source algorithm still reads slot presence before each callback invocation and snapshots the original length. The existing 16-element bound applies to other operations and to receivers with only a dense-shape proof or a symbolic length.

This draft depends on #625. Its model catalog adds two private primitives to the map dependency closure. The review branch leaves the frozen experiment profiles as recorded.

Results

The original R5 overlay comparison held the program, coverage denominator, runtime profile and 30-second search budget fixed for three paired runs on RecFunExpr. At the diagnosed map call site, residual fallback counts were 283, 823, and 625 under the 16-element bound and zero under the 64-element bound. Each arm in every pair entered the same 140 of 229 IR points. This establishes that the cap caused those fallbacks and provides no coverage improvement on this subject.

The extracted branch passed 78 targeted tests and both Detekt checks. Node.js replay checks native behavior for holes, explicit undefined, callback mutation, lengths 64 and 65, and another array routine. The exact catalog test exercises the dependency closure with only ts.array.map selected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant