in reply to 'bignum' performance

One thing you might try before targeting anything for optimization is Profiling your code. Profiling will tell you where your time is really spent, so you don't have to guess.

If you're calling an expensive function many times, you might look at Memoize. This assumes that some input always produces the same output, and it uses memory to gain speed.