I was wondering if sbcl does any optimisations when performing modular arithmetic. I have written some code that does elliptic curve operations and I was trying to see if I could improve performance by implementing any of the algorithms designed to improve performance of modular operations such as fast reductions for NIST primes. What I have written appears to be correct since it agrees with the built in mod operator, but it actually takes longer. Is it worth my effort to try to use algorithms to improve performances of modular operations? As far as I can tell, that should be the major bottle-neck for elliptic curve operations as I've implemented them.
I was also wondering if anybody knows how performance in sbcl of large integer arithmetic compares to performance in gmp. Thank you.