Python's math.factorial() implementation is orders of magnitude faster in Python3 over Python2. It is due to asymptotically faster factorial algorithm used, unified representation of Python numeric types and their numerical algorithms being used.
It is an attempt to reimplemnt the same idea.