Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dbe0b0a08f9a72c3ac2c35da4e7033a02d6fc1c5
      
https://github.com/WebKit/WebKit/commit/dbe0b0a08f9a72c3ac2c35da4e7033a02d6fc1c5
  Author: Sosuke Suzuki <[email protected]>
  Date:   2026-03-05 (Thu, 05 Mar 2026)

  Changed paths:
    A JSTests/microbenchmarks/rope-includes-one-char.js
    A JSTests/stress/rope-string-includes.js
    M Source/JavaScriptCore/runtime/StringPrototype.cpp

  Log Message:
  -----------
  [JSC] Use `tryFindOneChar` for `String#includes`
https://bugs.webkit.org/show_bug.cgi?id=307633

Reviewed by Yusuke Suzuki.

This patch changes to use tryFindOneChar added in 307324@main for 
String#includes.

String#includes is handled as StringIndexOf node in DFG, it alreadly uses 
tryFindOneChar.
So this PR does not change DFG/FTL.

                                TipOfTree                  Patched

rope-includes-one-char        3.4551+-0.0917     ^      1.2645+-0.0909        ^ 
definitely 2.7325x faster

Tests: JSTests/microbenchmarks/rope-includes-one-char.js
       JSTests/stress/rope-string-includes.js

* JSTests/microbenchmarks/rope-includes-one-char.js: Added.
(testFoundEarly):
(testNotFound):
* JSTests/stress/rope-string-includes.js: Added.
(assert):
(makeLongRope):
(testBasicRopeIncludes):
(testNestedRopeStartPosition):
* Source/JavaScriptCore/runtime/StringPrototype.cpp:
(JSC::stringIncludesImpl):
(JSC::JSC_DEFINE_HOST_FUNCTION):

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



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

Reply via email to