Bug 303605

Summary: [JSC] Optimize 2 args `String#concat` call
Product: WebKit Reporter: Sosuke Suzuki <aosukeke>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

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
Sosuke Suzuki
Comment 1 2025-12-04 21:53:42 PST
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
Note You need to log in before you can comment on or make changes to this bug.