WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
303605
[JSC] Optimize 2 args `String#concat` call
https://bugs.webkit.org/show_bug.cgi?id=303605
Summary
[JSC] Optimize 2 args `String#concat` call
Sosuke Suzuki
Reported
2025-12-04 21:42:14 PST
This patch changes to optimize 2 args `String#concat`. Transpilers like Babel transpile template literals such as `${foo}${bar}` into a 2 args `String#concat`[1]. In fact, `wasm/tfjs-bundle.js` from JetStream3 contains hundreds of 2 arguments `String#concat`. TipOfTree Patched string-prototype-concat-2-args 7.8642+-0.3652 ^ 1.9200+-0.2046 ^ definitely 4.0960x faster [1]:
https://babeljs.io/repl#?config_lz=N4IgZglgNgpgdgQwLYxALhAJxgBygOgCsBnEAGhB22JgBdS0BtRkeAN3NFoUwHM6GICDAAEARjHkQSAPYATAK6wGYBFBoBfALpaKxGQswBjGABUAnjlQZZi2CA1A&code_lz=AYEg3gZg9lC-4CMCGAnWwDcQ&lineWrap=true&version=7.28.5
Attachments
Add attachment
proposed patch, testcase, etc.
Sosuke Suzuki
Comment 1
2025-12-04 21:53:42 PST
Pull request:
https://github.com/WebKit/WebKit/pull/54900
EWS
Comment 2
2025-12-05 03:16:15 PST
Committed
303971@main
(ffad432a5d1a): <
https://commits.webkit.org/303971@main
> Reviewed commits have been landed. Closing PR #54900 and removing active labels.
Radar WebKit Bug Importer
Comment 3
2025-12-05 03:17:13 PST
<
rdar://problem/165905684
>
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