This is the mail archive of the
newlib@sourceware.cygnus.com
mailing list for the newlib project.
Re: Q: mathfp goals.
- To: Sergei Organov <osv at javad dot ru>
- Subject: Re: Q: mathfp goals.
- From: Ranjith Kumaran <ranjith at cygnus dot com>
- Date: Thu, 16 Mar 2000 08:34:35 -0800 (PST)
- cc: newlib at sourceware dot cygnus dot com
> If the goal is speed, then in some places 'mathfp' seems strange. Consider,
> for example, code for 'fabs'
> I believe that on many processors the 'math' version is (much) faster due to
> abscence of branches.
Yes, you're right, the math version may indeed run faster in a lot of
cases. A patch to revert the code to the previous state can be proposed
if this seems like the right idea. Feel free to comment on it if there
are any further thoughts.
> Did somebody *actually* compare speeds of both math versions? Are the results
> available?
The mathfp package was put together after a few requests for a floating
point math library. This was about a year and a half ago. At the time
some informal tests were run and the results were promising; however,
work on mathfp was suspended until the release of newlib 1.8.2 when it
was decided that it would be open-sourced as-is as an option to newlib
while still leaving the old math library intact.
So, yes, speeds were compared to make sure that the overall performance
was reasonable but not scrutinized too much. The process of creating a
formal testsuite never got under way as work on mathfp was stopped.
Since its inclusion in the newlib package mathfp has enjoyed the benefit
of actually being exercised by the public as can be seen by the various
fixes that have been submitted.
-----
Ranjith Kumaran (ranjith@cygnus.com)
Cygnus Solutions, a Red Hat Company
416-482-2661 Ext. 303