Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ec89a5102de07389efc7b31a277de2c8df6bf77b
      
https://github.com/WebKit/WebKit/commit/ec89a5102de07389efc7b31a277de2c8df6bf77b
  Author: Sosuke Suzuki <[email protected]>
  Date:   2025-07-25 (Fri, 25 Jul 2025)

  Changed paths:
    A JSTests/microbenchmarks/regexp-prototype-search-no-strength-reduction.js
    A JSTests/stress/regexp-prototype-search-strength-reduction.js
    M Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp

  Log Message:
  -----------
  [JSC] Fold `RegExp#@@search` at DFG StrengthReduction phase
https://bugs.webkit.org/show_bug.cgi?id=295147

Reviewed by Yusuke Suzuki.

JSC handles RegExp#exec, RegExp#test and RegExp#match in the DFG 
StrengthReduction
phase for constant folding optimization.

This patch changes to exted the same optimization to the `RegExpSearch` node 
that was
added in https://commits.webkit.org/296443@main.

                                                  TipOfTree                  
Patched

regexp-prototype-search-no-strength-reduction
                                               93.2792+-1.0921     ?     
93.4058+-0.9316        ?
regexp-prototype-search-short-string           32.7441+-1.0533     ^      
5.0470+-0.0546        ^ definitely 6.4878x faster
regexp-prototype-search-complex-pattern        54.5425+-2.5405     ^      
6.8118+-0.1985        ^ definitely 8.0071x faster
regexp-prototype-search-basic                 119.5020+-1.8881     ^     
11.0128+-0.3870        ^ definitely 10.8512x faster
regexp-prototype-search-observable-side-effects2
                                                0.1547+-0.0286     ?      
0.1674+-0.0140        ? might be 1.0821x slower
regexp-prototype-search-anchor                 59.0436+-3.4802     ^      
6.9537+-0.2744        ^ definitely 8.4909x faster
regexp-prototype-search-observable-side-effects
                                                0.2566+-0.0065     ?      
0.2590+-0.0054        ?

* JSTests/microbenchmarks/regexp-prototype-search-no-strength-reduction.js: 
Added.
(shouldBe):
* JSTests/stress/regexp-prototype-search-strength-reduction.js: Added.
(shouldBe):
* Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):

Canonical link: https://commits.webkit.org/297859@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