I have been using python's native bignums for an algorithm and decided to try and speed it up by converting it to C++. When I used long longs, the C++ was about 100x faster than the python, but when I used GMP bindings in C++, it was only 10x faster than the python (for the same cases that fit in long longs).
Is there a better bignum implementation for doing a large number of small additions? For example, we have a big number N we'll be adding a lot of little +1, +21, +1, etc. and every once and a while adds another big number M?
Did you do profiling ? Of Python and C++ whole applications. So that you know that you really need that additional speed.
Try Python 3k it now have any-length integers implemented!
Bignum implementation that has efficient addition of small integers