Is there any way to reduce the time complexity of the factorial function below O(n), and what is the time complexity of its implementation in the math library in python?
Also, is any memorization done for some set of inputs (in Python 3), to further reduce its runtime?