RFC: fp printing speedup patch
Jerry Quinn
jlquinn@optonline.net
Mon Nov 3 03:18:00 GMT 2003
Hi, folks. After way too long, I've finally gotten working a patch to integrate
the libio fp printing code into the library. For the example in the
performance testsuite, this is worth a 3.5x speedup, since the routines use
doubles in place of big int computations.
The catch (of course there's a catch) is that printing numbers not handled by
the fp optimizations are something like 2x slower than sprintf. This happens
when printing with more than about 15 digits of precision for double. For
general printing, this patch is MUCH faster.
The current status is that I have long double support working, and the patch
passes with no regressions on x86 linux. I don't have any other platforms, so
I can't validate the IBM and VAX codepaths.
This is at the point where I need help with configury issues. There's a few
things that have to be set up:
* uint32_t and int32_t types
* IEEE, IBM, or VAX
* big or little endian
* IEEE quad or extended
* long double support for IBM and VAX?
* Check_FLT_ROUNDS - i'm not sure what this really does
Finally, is this OK for stage 3? It certainly fixes a performance regression
wrt gcc 2.95.
Thanks,
Jerry Quinn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fpspeed.patch.gz
Type: application/octet-stream
Size: 19834 bytes
Desc: fp patch
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20031103/08b8e91c/attachment.obj>
More information about the Libstdc++
mailing list