sympy/sympy — pull request #2371 by QuaBoo (2013-08-09 23:48:34+00:00)
Title: A simple pow() optimization 

simple patch to use optimized pow(a,x,n) for a**x % n, makes it MUCH faster for big numbers.