Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d2d61f8871a4dfacef8f0ba59b004834c2e9649d
      
https://github.com/WebKit/WebKit/commit/d2d61f8871a4dfacef8f0ba59b004834c2e9649d
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-09-20 (Sun, 20 Sep 2026)

  Changed paths:
    M JSTests/stress/bigint-multiply-comba.js
    M Source/JavaScriptCore/runtime/JSBigInt.cpp

  Log Message:
  -----------
  [JSC] Use std::span in multiplication in JSBigInt while not increasing 
assertions
https://bugs.webkit.org/show_bug.cgi?id=324494
rdar://187734341

Reviewed by Yijia Huang.

This patch changes JSBigInt multiplication to use std::span instead of
pointers. But super important thing is not regressing performance. This
code is incredibly hot so we must not hurt anything: we should not add
anything unnecessary. So, we carefully use specific idioms via std::span
/ RELEASE_ASSERT to teach compilers to prove std::span element access in
the loop is always safe. We confirmed that we do not increase any
assertions while using std::span by looking into the produced binary.

* JSTests/stress/bigint-multiply-comba.js:
* Source/JavaScriptCore/runtime/JSBigInt.cpp:
(JSC::clampedSubspan):
(JSC::forEachSlidingColumn):
(JSC::accumulateSlidingColumns):
(JSC::JSBigInt::multiplySchoolbook):
(JSC::JSBigInt::multiplySpecialLow):
(JSC::JSBigInt::multiplySpecialHigh):
(JSC::JSBigInt::multiplyComba):
(JSC::multiplySpecialColumn):
(JSC::JSBigInt::multiplySpecialHighFixed):
(JSC::JSBigInt::multiplySpecialLowFixed):

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



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

Reply via email to