Closed Bug 1782953 Opened 2 years ago Closed 2 years ago

Optimize sparse element accesses in more cases

Categories

(Core :: JavaScript Engine: JIT, task, P3)

task

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(2 files)

I noticed a few issues related to sparse elements in bug 1782566:

  1. We only optimize getting/setting sparse elements on arrays and not plain objects.
  2. We don't optimize getting/setting sparse elements if index < initializedLength (dense element holes).

We only supported arrays, but plain objects often have sparse elements too.

Turns GuardIndexGreaterThanDenseInitLength into GuardIndexIsNotDenseElement.

It's not uncommon to have objects with both sparse elements and holes in the dense
elements. We can now optimize dense element holes with the sparse element VM functions
instead of deoptimizing the IC.

Depends on D153600

Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bff0d79f0218
part 1 - Optimize getting/setting sparse elements on plain objects too. r=iain
https://hg.mozilla.org/integration/autoland/rev/27d77030e725
part 2 - Optimize sparse elements with index < initializedLength. r=iain
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: