Skip to content

Conversation

@xtonik
Copy link

@xtonik xtonik commented Jun 16, 2023

It is up to 10% more performant to multiply by power of 5 and then shift left than multiplying directly by power of 10 for some bit ranges when used standard BigInteger.multiply().

Minimal number of bits, for which is variant more performant was determined to 800 using benchmark.

The use of powers of five is limited from above by constant FftMultiplier.FFT_THRESHOLD.

There is several times more places to be changed than provided example in 1041b4b.

There is some performance trade off in proposed example, as powers of five are computed separately of powers of ten so some powers of ten are stored uselessly since. More aggressive changes to the code are necessary then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants