Improve knockout compareSmallArrayToBigArray function performance
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
People
(Reporter: h4writer, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.89 KB,
application/javascript
|
Details |
Reporter | ||
Comment 1•10 years ago
|
||
Comment hidden (obsolete) |
Reporter | ||
Comment 3•10 years ago
|
||
Reporter | ||
Comment 4•10 years ago
|
||
Updated•2 years ago
|
Comment 5•1 year ago
|
||
Nightly: https://share.firefox.dev/3v7XTTr (2.2s)
Chrome: https://share.firefox.dev/49OwoNU (1s)
Comment 6•1 year ago
|
||
This is spending 84% of its time inside AddOrUpdateSparseElementHelper, with the biggest single chunk in ensureDenseInitializedLength
. Taking a look at the CacheIR we generate, I think we may also be hitting the case where we don't transpile any CacheIR for some GetElem stubs because we have a mix of dense and sparse elements.
Broadly speaking, this appears to come down to how we handle sparse arrays. I know we've seen sparse arrays in the wild in the past (Google Docs, IIRC), but I haven't seen it matter much recently. Probably worth keeping this around, although I'm not sure it's a priority yet without additional evidence. This testcase is doing weird things with arrays.
Description
•