Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e4e7aafcdfd89713c9d274f0552d87da5f13671d
https://github.com/WebKit/WebKit/commit/e4e7aafcdfd89713c9d274f0552d87da5f13671d
Author: Yusuke Suzuki <[email protected]>
Date: 2026-03-11 (Wed, 11 Mar 2026)
Changed paths:
M Source/JavaScriptCore/runtime/JSBigInt.cpp
M Source/JavaScriptCore/runtime/JSBigInt.h
Log Message:
-----------
[JSC] JSBigInt multiply can just use JSBigInt as a result buffer
https://bugs.webkit.org/show_bug.cgi?id=309637
rdar://172240494
Reviewed by Keith Miller.
When computing N * M, where N digits and M digits, digits are non-zero,
and N and M are non-zero, result is always either N + M digits or
N + M - 1 digits. So, it is not wasteful if we just allocate JSBigInt with
N + M size, and adjust the length later. This avoids costly copying.
* Source/JavaScriptCore/runtime/JSBigInt.cpp:
(JSC::JSBigInt::multiplyImpl):
* Source/JavaScriptCore/runtime/JSBigInt.h:
Canonical link: https://commits.webkit.org/309092@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications