Closed
Bug 519503
Opened 16 years ago
Closed 15 years ago
str_split shouldn't have to use JS_SetElement to fill in the array
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: Waldo)
Details
(Keywords: perf)
If it could call something like js_ArrayCompPush (which perhaps needs renaming and maybe needs the length check removed) or array_push1_dense that would be somewhat faster (6% win on the dromaeo string split test).
The question Jason and I had is why the INDEX_TOO_BIG check in array_push1_dense (via INDEX_TOO_SPARSE) is present and whether js_ArrayCompPush should replace the check it currently does with a similar check (and get renamed to js_DenseArrayPush along the way).
Comment 1•16 years ago
|
||
I remember Waldo playing with this code.
Assignee | ||
Updated•15 years ago
|
Assignee: general → jwalden+bmo
Assignee | ||
Comment 2•15 years ago
|
||
Fixed in bug 538690 by using js::AutoValueVector to build up a vector of contents, then build the array all at once in the end from that vector. It's possible it would be even faster to build directly into the array, but the complexity of pushing onto an array (handling dense->slow transitions, slots resizing, etc.) makes me less than certain it would be much of a win, if it even were a win.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•