This crate provides some convenient and safe methods to compute the factorial in O(n) time.
They are not necessarily the fastest versions: there are prime sieve methods that compute the factorial in O(n (log n loglog n)^2). Patches are welcome.
O(n (log n loglog n)^2)