What's the fastest implementation for bignum? (Java's bigInteger / Cython's int / gmpy / etc...)
Are there any benchmark on this???
(I tried googling for some results but found none...
and I coul开发者_StackOverflowdn't test gmpy because gmplib wouldn't be installed on my laptop)
thank you!
First of all, I'm probably biased since I'm the maintainer of gmpy.
gmpy uses the GMP multiple-precision library and GMP is usually considered the fastest general purpose multiple-precision library. But when it's "fastest" depends on on the operation and the size of the values. When I compare the performance between Python longs and gmpy's mpz type, the crossover point is roughly between 20 and 50 digits. You'll probably get different results on your machine.
What exactly are you trying to do?
精彩评论