Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 90c053c6e5131530d4fc78327183c30e1ddb4f3f
      
https://github.com/WebKit/WebKit/commit/90c053c6e5131530d4fc78327183c30e1ddb4f3f
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-04-29 (Wed, 29 Apr 2026)

  Changed paths:
    A JSTests/microbenchmarks/array-prototype-lastIndexOf-contiguous-long.js
    A JSTests/microbenchmarks/array-prototype-lastIndexOf-int32-long.js
    M Source/JavaScriptCore/runtime/ArrayPrototype.cpp
    M Source/WTF/wtf/text/StringCommon.h

  Log Message:
  -----------
  [JSC] Optimize Array.prototype.lastIndexOf
https://bugs.webkit.org/show_bug.cgi?id=313672
rdar://175874889

Reviewed by Yijia Huang.

Add reverseFind64 and use it in Array.prototype.lastIndexOf
implementation.

array-prototype-lastIndexOf-contiguous-long 102.3369+-0.1355     ^     
96.2670+-3.3248        ^ definitely 1.0631x faster

Tests: JSTests/microbenchmarks/array-prototype-lastIndexOf-contiguous-long.js
       JSTests/microbenchmarks/array-prototype-lastIndexOf-int32-long.js

* JSTests/microbenchmarks/array-prototype-lastIndexOf-contiguous-long.js: Added.
(test):
* JSTests/microbenchmarks/array-prototype-lastIndexOf-int32-long.js: Added.
(test):
* Source/JavaScriptCore/runtime/ArrayPrototype.cpp:
(JSC::fastIndexOf):
* Source/WTF/wtf/text/StringCommon.h:
(WTF::reverseFind64):

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



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

Reply via email to