[Webkit-unassigned] [Bug 239266] New: [JSC] Don't generate ropes when they will be very short-lived
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 12 17:25:06 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=239266
Bug ID: 239266
Summary: [JSC] Don't generate ropes when they will be very
short-lived
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: rmorisset at apple.com
Currently our code for concatenation always generate ropes. This is rather wasteful when we can tell statically that they will flow into a GetByVal or similar opcode that resolves the rope, as it forces us to do some extra allocations, massively increasing GC pressure. Worse, some of our opcodes using strings only have fast paths for non-rope strings.
The simplest solution would be to add an eager_str_cat opcode (name to be bikeshedded) to DFG that does string concatenation without bothering with a rope, and have a pass in the DFG that finds all string concatenations that is dominated by a use of the string that resolves the rope, and replaces these concatenations by eager_str_cat.
This optimization was found by looking at the code that we generate for JS2, so I expect it is likely to be a significant speedup.
--
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/20220413/246f0b6f/attachment-0001.htm>
More information about the webkit-unassigned
mailing list