Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a6f9b723771ef40d176aaae2cd3f3e3f99e9750c
      
https://github.com/WebKit/WebKit/commit/a6f9b723771ef40d176aaae2cd3f3e3f99e9750c
  Author: Sosuke Suzuki <[email protected]>
  Date:   2026-07-20 (Mon, 20 Jul 2026)

  Changed paths:
    A JSTests/microbenchmarks/math-max-3args.js
    A JSTests/microbenchmarks/math-min.js
    M Source/JavaScriptCore/runtime/VM.cpp

  Log Message:
  -----------
  [JSC] Wire ARM64 min / max specialized thunks into 
`thunkGeneratorForIntrinsic`
https://bugs.webkit.org/show_bug.cgi?id=319795

Reviewed by Yusuke Suzuki.

281118@main added maxThunkGenerator / minThunkGenerator for ARM64, which have 
fast paths for
Int32-Int32 / Int32-Double / Double-Int32 / Double-Double using fmax / fmin, 
but did not
add cases for MaxIntrinsic / MinIntrinsic in thunkGeneratorForIntrinsic. So the 
thunks were
never installed and Math.max / Math.min calls from LLInt / Baseline always went
to the C++
host functions. This patch wires them up.

With DFG / FTL disabled (LLInt / Baseline):

                                              Baseline                  Patched

    math-max                              31.9392+-0.6313     ^     
23.8925+-0.2638        ^ definitely 1.3368x faster
    math-min                              31.7652+-0.3611     ^     
23.8972+-0.1425        ^ definitely 1.3292x faster
    int-or-other-max-then-get-by-val       6.4980+-0.0923     ^      
5.3080+-0.1749        ^ definitely 1.2242x faster
    int-or-other-min-then-get-by-val       6.4999+-0.0749     ^      
5.2814+-0.0590        ^ definitely 1.2307x faster

Neutral in the default configuration since DFG / FTL handle ArithMin / ArithMax 
by themselves.

Tests: JSTests/microbenchmarks/math-max-3args.js
       JSTests/microbenchmarks/math-min.js

* JSTests/microbenchmarks/math-max-3args.js: Added.
(max3):
* JSTests/microbenchmarks/math-min.js: Added.
(min):
*
Source/JavaScriptCore/runtime/VM.cpp:
(JSC::thunkGeneratorForIntrinsic):

Canonical link: 
https://flagged.apple.com:443/proxy?t2=Db7V7P9Eo4&o=aHR0cHM6Ly9jb21taXRzLndlYmtpdC5vcmcvMzE3NTY4QG1haW4=&emid=6fe13cea-171c-474b-b92a-b33aa10a0e6c&c=11



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

Reply via email to