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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 28 09:49:34 PST 2019


https://bugs.webkit.org/show_bug.cgi?id=193912

            Bug ID: 193912
           Summary: [JSC] Repeat string created from
                    Array.prototype.join() take too much memory
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: guijemont at igalia.com

The following code takes over 600M of rss on my linux x86_64 desktop:
  var a = new Array(10 * 1024 * 1024).join('M');

and takes over 2s to run (on a dual Xeon E5-2630). I would expect it to take much less time and use an order of magnitude less memory.

As a comparison, the following code runs in ~27ms:
  var a = 'M'.repeat(10 * 1024 * 1024);

-- 
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/20190128/11b8919e/attachment.html>


More information about the webkit-unassigned mailing list