Open Bug 1359751 Opened 8 years ago Updated 2 years ago

Identify more places to use the cached string index value

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: evilpie, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: triage-deferred)

In bug 654190 I made various functions use the string index value, but there are more. - In Ion somewhere in StringToNumber. I think sometimes we don't even emit optimized code when handling strings just the Value variant. IIRC this happens with +string. - Make sure that we inline the getIndexValue call into ToInt32 etc. Right now these end up calling getIndexValue via ToNumber -> ToNumberSlow -> StringToNumber, maybe we should push the call up. - When parsing string literals we should try to cache the index value. This should speed up the parseInt benchmark in bug 930540. - Code using the DOM will sometimes have snippets like css.width = 100 + "px"; We could potentially optimize this by matching isRope() & leftChild->hasIndexValue() & rightChild == "px"
Keywords: triage-deferred
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.