Bug 303605
| Summary: | [JSC] Optimize 2 args `String#concat` call | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Sosuke Suzuki <aosukeke> |
| Component: | JavaScriptCore | Assignee: | 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
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
Pull request: https://github.com/WebKit/WebKit/pull/54900
EWS
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
<rdar://problem/165905684>