[Webkit-unassigned] [Bug 193912] [JSC] Repeat string created from Array.prototype.join() take too much memory

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 31 13:00:41 PST 2019


--- Comment #3 from Guillaume Emont <guijemont at igalia.com> ---
The first idea I'm currently exploring is to change fastJoin() in ArrayPrototype.cpp so that if the array is uninitialized (I think that's equivalent to indexingType() == ArrayType), we call String.prototype.repeat().

That's a relatively quick fix that should help in this specific test case, though I'm still curious to understand why a string of 10M chars seems to take 485MB of memory (or at least we reserve that much, according to massif). That's an average of 48.5 bytes per char, I think we could do better, even if it was a totally random string.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190131/7eb6f4f9/attachment.html>

More information about the webkit-unassigned mailing list