Open Bug 1938100 Opened 2 months ago Updated 23 days ago

Optimize more key types for GetElem/SetElem

Categories

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

task

Tracking

()

People

(Reporter: jandem, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sp3])

The VMFunction list in bug 1935626 shows we have 435312 calls to IonGetPropertyIC::update on Speedometer 3.

I looked into this more and 80% of these are for a megamorphic GetElem property access in react-stockcharts where the property key is sometimes a boolean. Fortunately it's easy to fix our CacheIR generator to treat these as "true"/"false" keys.

The #2 case with ~7% uses an array index of -1. This is the same issue as bug 1932864 comment 4.

The upside is that apart from these edge cases we have great CacheIR coverage for property accesses nowadays.

Whiteboard: [sp3]
See Also: → 1816609, 1811753

Handling negative integers such as -1 is more complicated because typed arrays have different behavior for negative integers vs regular named properties.

(In reply to Jan de Mooij [:jandem] from comment #1)

Handling negative integers such as -1 is more complicated because typed arrays have different behavior for negative integers vs regular named properties.

Actually this isn't an issue because we already have to support string keys like object["-1"], so turning object[-1] into object["-1"] should be completely fine for typed arrays too.

Depends on: 1938518
Assignee: jdemooij → nobody
Status: ASSIGNED → NEW
Severity: -- → N/A
Priority: -- → P2
Depends on: 1941947
You need to log in before you can comment on or make changes to this bug.