Bug 279862

Summary: [JSC] Add fast path for `array.concat()`
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 2024-09-17 20:30:50 PDT
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
Sosuke Suzuki
Comment 1 2024-09-17 20:31:49 PDT
EWS
Comment 2 2024-09-22 23:05:55 PDT
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
Comment 3 2024-09-22 23:06:15 PDT
Note You need to log in before you can comment on or make changes to this bug.