Optimize more key types for GetElem/SetElem
Categories
(Core :: JavaScript Engine: JIT, task, P2)
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.
Reporter | ||
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Reporter | ||
Comment 1•2 months ago
|
||
Handling negative integers such as -1
is more complicated because typed arrays have different behavior for negative integers vs regular named properties.
Reporter | ||
Comment 2•2 months ago
|
||
(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.
Reporter | ||
Updated•2 months ago
|
Updated•1 month ago
|
Description
•