You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
modexp: GCC 15 and 16 keep the addmul() product in a stack slot #1801
With GCC 15, which CodSpeed uses since #1798, modexp<expmod_execute_evmone>[mod_len:32/mod_tz:254/exp_bits:256] is 16% slower than with GCC 14 (0.84x), and master runs 9% more instructions on it (135k vs 124k per call).
The difference is in the addmul() loop inlined into modexp_pow2(). GCC 15 and 16 keep the uint128 product of umul() in a stack slot, storing and reloading it in every iteration (16 instructions per word instead of 12):
GCC 14 keeps the product in registers on master, but compiles the same loop into this code after unrelated changes, e.g. the INTX_REQUIRE hints of #1794. A fix could keep the product in registers explicitly in addmul().
Activity
crypto: Use unsigned __int128 in multiply-accumulate with GCC
crypto: Use unsigned __int128 in multiply-accumulate with GCC
crypto: Use unsigned __int128 in multiply-accumulate with GCC