[webkit-changes] [WebKit/WebKit] bdf66e: Math.hypot() is significantly slower than Math.sqrt()

Keita Nonaka noreply at github.com
Sat Mar 22 18:57:02 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bdf66e673c2cd00105ced79e319cb12b8ba6b373
      https://github.com/WebKit/WebKit/commit/bdf66e673c2cd00105ced79e319cb12b8ba6b373
  Author: Keita Nonaka <iKonnyaku40 at gmail.com>
  Date:   2025-03-22 (Sat, 22 Mar 2025)

  Changed paths:
    A JSTests/microbenchmarks/math-hypot.js
    A JSTests/microbenchmarks/math-sqrt.js
    M Source/JavaScriptCore/runtime/MathObject.cpp

  Log Message:
  -----------
  Math.hypot() is significantly slower than Math.sqrt()
https://bugs.webkit.org/show_bug.cgi?id=284631

Reviewed by Yusuke Suzuki.

optimized `Math.hypot()` for cases with 1, 2 or 3 arguments

* JSTests/microbenchmarks/math-hypot.js: Added.
(hypot):
* Source/JavaScriptCore/runtime/MathObject.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):

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



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


More information about the webkit-changes mailing list