And another version. (I should have checked upstream before posting the
last one, sigh)
This one incorporates (with heavy adaptations) a new optimization from
upstream, adding a fastpath for values that happen to be small nonzero
integers. The overhead is low enough for this to be worthwhile.
Additionally, I've now micro-optimized the fixed-point output format
code (which is not in upstream), so it no longer makes a noticable
difference to performance.
There probably isn't any need for more optimization here since it's now
measurably faster (sometimes almost 2x faster) than bigint output in all
my tests (which probably means we could improve on bigint's performance,
but that's a job for another day).
--
Andrew (irc:RhodiumToad)