WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
239266
[JSC] Don't generate ropes when they will be very short-lived
https://bugs.webkit.org/show_bug.cgi?id=239266
Summary
[JSC] Don't generate ropes when they will be very short-lived
Robin Morisset
Reported
2022-04-12 17:25:06 PDT
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-04-19 17:26:12 PDT
<
rdar://problem/91996051
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug