Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fdb282b50fa810129e6d14c95010a1d30e246fe9
      
https://github.com/WebKit/WebKit/commit/fdb282b50fa810129e6d14c95010a1d30e246fe9
  Author: Sosuke Suzuki <[email protected]>
  Date:   2026-01-16 (Fri, 16 Jan 2026)

  Changed paths:
    A JSTests/microbenchmarks/scoped-arguments-slice-double.js
    A JSTests/microbenchmarks/scoped-arguments-slice-int32.js
    A JSTests/microbenchmarks/scoped-arguments-slice.js
    A JSTests/stress/slice-scoped-arguments.js
    M Source/JavaScriptCore/runtime/JSArray.cpp
    M Source/JavaScriptCore/runtime/ScopedArguments.cpp
    M Source/JavaScriptCore/runtime/ScopedArguments.h

  Log Message:
  -----------
  [JSC] Add fast path for Array.prototype.slice on ScopedArguments
https://bugs.webkit.org/show_bug.cgi?id=304838

Reviewed by Yusuke Suzuki.

This change adds a fast path for Array.prototype.slice when called on
ScopedArguments objects, similar to the existing optimization for
DirectArguments.

                                       TipOfTree                  Patched

scoped-arguments-slice             155.2137+-1.8613     ^     63.0061+-1.4876   
     ^ definitely 2.4635x faster
scoped-arguments-slice-int32       155.8805+-5.8409     ^     60.1825+-1.5710   
     ^ definitely 2.5901x faster
scoped-arguments-slice-double      156.4347+-4.6210     ^     68.9260+-1.2236   
     ^ definitely 2.2696x faster

* JSTests/microbenchmarks/scoped-arguments-slice-double.js: Added.
* JSTests/microbenchmarks/scoped-arguments-slice-int32.js: Added.
* JSTests/microbenchmarks/scoped-arguments-slice.js: Added.
* JSTests/stress/slice-scoped-arguments.js: Added.
* Source/JavaScriptCore/runtime/JSArray.cpp:
(JSC::JSArray::fastSlice): Add ScopedArgumentsType case.
* Source/JavaScriptCore/runtime/ScopedArguments.cpp:
(JSC::ScopedArguments::fastSlice): Added.
* Source/JavaScriptCore/runtime/ScopedArguments.h:

Canonical link: https://commits.webkit.org/305704@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to