FastDoubleParser
FastDoubleParser copied to clipboard
Multiply by power of 5 and then shift left
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.