Bug 279862
| Summary: | [JSC] Add fast path for `array.concat()` | ||
|---|---|---|---|
| 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 adds fast path for `array.concat()` using same way as `Array.from(array)` and
`Iterator#toArray.call(array)`.
According to microbench it is 1.5~6x faster.
TipOfTree Patched
array-prototype-concat-copy-obj 1.5511+-0.0177 ^ 0.9972+-0.0240 ^ definitely 1.5555x faster
array-prototype-concat-copy-double 1.5206+-0.0444 ^ 0.9512+-0.0144 ^ definitely 1.5986x faster
array-prototype-concat-copy-int32 1.5138+-0.0141 ^ 0.9637+-0.0457 ^ definitely 1.5707x faster
<geometric> 1.5284+-0.0205 ^ 0.9704+-0.0137 ^ definitely 1.5750x faster
Other benchmarks of Arrray.prototype.concat show no performance regressions.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Sosuke Suzuki
Pull request: https://github.com/WebKit/WebKit/pull/33806
EWS
Committed 284060@main (21359545c81d): <https://commits.webkit.org/284060@main>
Reviewed commits have been landed. Closing PR #33806 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/136479133>