From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: Jeff Law <law@redhat.com>,
Richard Biener <richard.guenther@gmail.com>,
Alexander Monakov <amonakov@ispras.ru>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, nd <nd@arm.com>
Subject: Re: [PATCH v2] Simplify pow with constant
Date: Fri, 25 Aug 2017 14:37:00 -0000 [thread overview]
Message-ID: <DB6PR0801MB2053761AEB74438EF11E11E0839B0@DB6PR0801MB2053.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <57489640-3aed-85f8-c866-95f7d06cd7a4@redhat.com>
Jeff Law wrote:
> Right. exp is painful in glibc, but pow is *dramatically* more painful
> and likely always will be.
>
> Siddhesh did some great work in bringing those costs down in glibc but
> the more code we can reasonably shunt into exp instead of pow, the better.
>
> It's likely pow will always be significantly more expensive than exp.
> It's also likely that predicting when these functions are going to go
> off the fast paths is painful.
With a modern implementation there won't be any slow path - it's completely
unnecessary, and you can get 100x speedup by simply doing things in a
sane way.
Szabolc's version of powf is almost literally doing exp(log(x) * y), so exp is
about twice as fast as pow.
Wilco
next prev parent reply other threads:[~2017-08-25 13:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-04 11:23 [PATCH] " Wilco Dijkstra
2017-08-04 12:26 ` Alexander Monakov
2017-08-04 12:44 ` Richard Biener
2017-08-04 15:28 ` Wilco Dijkstra
2017-08-17 14:19 ` [PATCH v2] " Wilco Dijkstra
2017-08-17 16:58 ` Alexander Monakov
2017-08-18 8:29 ` Richard Biener
2017-08-18 13:53 ` Wilco Dijkstra
2017-08-18 14:05 ` Richard Biener
2017-08-25 4:21 ` Jeff Law
2017-08-25 0:31 ` Jeff Law
2017-08-25 14:37 ` Wilco Dijkstra [this message]
2017-08-04 22:38 ` [PATCH] " Joseph Myers
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=DB6PR0801MB2053761AEB74438EF11E11E0839B0@DB6PR0801MB2053.eurprd08.prod.outlook.com \
--to=wilco.dijkstra@arm.com \
--cc=amonakov@ispras.ru \
--cc=gcc-patches@gcc.gnu.org \
--cc=law@redhat.com \
--cc=nd@arm.com \
--cc=richard.guenther@gmail.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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).