nucypher / DarkIntegers.jl

A modulo arithmetic toolbox for integers and polynomials
https://nucypher.github.io/DarkIntegers.jl
GNU General Public License v3.0
7 stars 2 forks source link

Performance of `mulmod_montgomery()` depends on the order of arguments #17

Open fjarri opened 4 years ago

fjarri commented 4 years ago

from_montgomery()'s performance depends on whether we use mulmod_montgomery(x, 1) or mulmod_montgomery(1, x) - the former works faster with MLUInt{3, UInt32}, and the latter with MLUInt{2, UInt64}. Need to run tests on different combinations, determine the pattern, and make several implementations.