[phobos] BigInt from Tango

Don Clugston dclugston at googlemail.com
Thu Mar 25 13:05:50 PDT 2010


On 25 March 2010 17:17, Brad Roberts <braddr at puremagic.com> wrote:
> How's it compare to gmp?

Those numbers include memory allocation, which I've made no attempt to
optimize. The low-level asm routines are pretty close to optimal on
x86, I believe they are faster than gmp 4 in a few cases (the addition
routine beats anything I've seen elsewhere). But I expect that gmp has
done a lot of work on the glue layer to keep overheads down, and they
add up to being significant.
Also I've only implemented Karatsuba multiplication, which means gmp
will win on algorithmic complexity at a couple of hundred machine
words. But I would expect it to be at least within a factor of 2 of
gmp below that point.


Here's something I find hilarious: Google for "faster than gmp". Click
on the first hit. It's by one of the developers of the Magma computer
algebra system. Click on the link to his homepage, and take a look at
the photo. Then compare to the photo of me from the D conference. Can
you see the resemblance?

He's not only my cousin, in fact his mother and my mother are
identical twins. I had no idea until now that he'd done work on bigint
stuff. I just couldn't believe it. Must be genetic.


More information about the phobos mailing list