0

Are there any benchmark on this???

(I tried googling for some results but found none...

and I couldn't test gmpy because gmplib wouldn't be installed on my laptop)

thank you!

user269334
  • 539
  • 1
  • 6
  • 13
  • 2
    Isn't Cython's `int` the same as a C long? Did you mean the Python long integers? But either way, you'll have to define "fastest" - fastest for what in which circumstances? There are at least a dozen largely independent operations on bigints. –  Sep 26 '11 at 20:22

1 Answers1

2

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?

casevh
  • 11,093
  • 1
  • 24
  • 35