Switch to native arithmetic when numbers can fit in machine data types
That would be my first attempt. MPFR is likely to be a performance killer.
It seems to me you want to compute the logarithm of n! which you are already approximating with Stirling's formula.
Note that n!=Gamma(n+1). There are (seemingly) highly optimized functions to compute both the Gamma function and its logarithm. For example:
I would roll my own coarser approximation only if all the above fails performance-wise.