From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: Using float_t and double_t in math functions
Date: Thu, 9 May 2013 12:02:01 -0400 [thread overview]
Message-ID: <20130509160201.GN20323@brightrain.aerifal.cx> (raw)
In-Reply-To: <20130509132157.GF12689@port70.net>
On Thu, May 09, 2013 at 03:21:57PM +0200, Szabolcs Nagy wrote:
> * Rich Felker <dalias@aerifal.cx> [2013-05-08 21:43:27 -0400]:
> > As far as I can tell, in most of the affected code, keeping excess
> > precision does not hurt the accuracy of the result, and it might even
> > improve the results. Thus, nsz and I discussed (on IRC) the
> > possibility of changing intermediate variables in functions that can
> > accept excess precision from float and double to float_t and double_t.
> > This would not affect the generated code at all on machines without
> > excess precision, but on x86 (without SSE) it eliminates all the
> > costly store/load pairs. As an example (on my test machine), it
>
> ie. it is only for i386 (without sse)
> (which is not a trendy platform nowadays)
> but there it improves performance and
> code size a bit so it is worth doing
By the way, part of the reason I think we should make the change where
it doesn't hurt (and probably helps) accuracy is so we're not telling
people:
"Yes, some math functions in musl are slower than glibc because we're
taking extra care to make sure they give you less-accurate results."
:-)
In practice it's very few that are slower. I think most will just go
from being 2-3 times as fast as glibc to 3-5 times as fast as glibc.
Rich
prev parent reply other threads:[~2013-05-09 16:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-09 1:43 Rich Felker
2013-05-09 13:21 ` Szabolcs Nagy
2013-05-09 14:57 ` Rich Felker
2013-05-09 19:14 ` Szabolcs Nagy
2013-05-09 16:02 ` Rich Felker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130509160201.GN20323@brightrain.aerifal.cx \
--to=dalias@aerifal.cx \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).