Open
Bug 699324
Opened 13 years ago
Updated 2 years ago
Consider inverting the loop structure of callers to GetElement
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
NEW
People
(Reporter: bzbarsky, Unassigned)
References
Details
The current structure is that every call to GetElement checks what sort of object |obj| is and depending on that either does special stuff for dense arrays or arguments or falls through to either getElementIfPresent if called with an int or slow stuff involving resolve if called with a jsid. This typically happens over and over in a loop. It might be better to invert this: do checking of the object type once, then call a function templated on that type for whatever loop is doing GetElement. Furthermore, we could maybe try to be smarter about double vs uint indices so that callsites that currently use doubles can still take the int fast path in the common (non-overflowing) case.
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•