Consider the possibility of applying fast multiplication algorithms when [raising to a power](Consider the possibility of applying fast multiplication algorithms when raising to a power. I mean the Karatsuba algorithm in particular.
When I implemented it, I was able to get a noticeable performance increase only when multiplying numbers from 4 MB size or more: 17 seconds with normal multiplication and 15 seconds with Karatsuba multiplication or something like that. For values less than 4 MB there was a slowdown due to additional algorithm overhead.
Consider the possibility of applying fast multiplication algorithms when [raising to a power](Consider the possibility of applying fast multiplication algorithms when raising to a power. I mean the Karatsuba algorithm in particular.
When I implemented it, I was able to get a noticeable performance increase only when multiplying numbers from 4 MB size or more: 17 seconds with normal multiplication and 15 seconds with Karatsuba multiplication or something like that. For values less than 4 MB there was a slowdown due to additional algorithm overhead.