Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: efffcbcdef8631f9526d6dfcf08b1bd7c99dd0ea
      
https://github.com/WebKit/WebKit/commit/efffcbcdef8631f9526d6dfcf08b1bd7c99dd0ea
  Author: Sosuke Suzuki <[email protected]>
  Date:   2025-06-10 (Tue, 10 Jun 2025)

  Changed paths:
    A JSTests/microbenchmarks/array-prototype-toReversed-hole-int32.js
    A JSTests/microbenchmarks/array-prototype-toReversed-hole-object.js
    A JSTests/microbenchmarks/array-prototype-toReversed-hole-string.js
    A JSTests/stress/array-prototype-toReversed-hole-contiguous.js
    A JSTests/stress/array-prototype-toReversed-hole-double.js
    A JSTests/stress/array-prototype-toReversed-hole-int32.js
    M Source/JavaScriptCore/runtime/JSArray.cpp

  Log Message:
  -----------
  [JSC] Optimize `Array#toReversed` for an array contains hole
https://bugs.webkit.org/show_bug.cgi?id=294097

Reviewed by Yusuke Suzuki.

Previously, the fast path for `toReversed` would fall
back to the slow path whenever `this` was a holey array.

This patch adopts the same strategy as `tryCloneArrayFromFast`,
allowing the fast path to be retained whenever possible even
when `this` contains holes.

                                                TipOfTree                  
Patched

array-prototype-toReversed-hole-string       30.8089+-0.6040     ^      
7.3049+-0.2939        ^ definitely 4.2175x faster
array-prototype-toReversed-hole-int32        32.4921+-0.6975     ^      
7.6792+-0.3627        ^ definitely 4.2312x faster
array-prototype-toReversed-hole-object       30.7505+-0.4679     ^      
7.3179+-0.3822        ^ definitely 4.2021x faster

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to