✅ How to speed up execution of BigInteger.Pow?
I have this:
var result = BigInteger.Pow(1000, 10000000);
I know this is a big number but generation of this number takes too much time. Is it possible to speed up?8 Replies
I don't think anybody bothered to optimize for such outlandish exponents tbh
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
do you need the precision?
It looks like
BigInteger.Pow10
exists, and is likely more optimised
Yeah, BigInteger.Pow
uses square-and-multiply, but Pow10
uses lookup tables. However, it looks like they only go up to 10^512
. It should speed things up though
Of course, 1000^10000000
is (10^3)^10000000
is 10^30000000
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
I'm here. Actually I don't understand what is
BigInteger.Pow10
and how should I use it@TeBeCo Did you close this? Looks like it should still be open
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View