I didn't do any benchmarking but my hunch is that the real slowdown wrt the op's code (when used with bigint) came about as a result of the multiplication and division operators being replaced by function calls.
But then ... replacement of "operators" with "function calls" is really part and parcel of
, so I'm not sure that stating my "hunch" actually contributes anything terribly useful ... even if it *is* correct.