public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: "munroesj@linux.vnet.ibm.com" <munroesj@linux.vnet.ibm.com>,
	"adhemerval.zanella@linaro.org" <adhemerval.zanella@linaro.org>
Cc: "libc-alpha@sourceware.org" <libc-alpha@sourceware.org>, nd <nd@arm.com>
Subject: Re: [PATCH] powerpc: Add a POWER8-optimized version of powf()
Date: Sat, 27 May 2017 12:55:00 -0000	[thread overview]
Message-ID: <AM5PR0802MB2610870578CCA938957DAACC83FD0@AM5PR0802MB2610.eurprd08.prod.outlook.com> (raw)

Steven Munroe wrote:
> On Fri, 2017-05-26 at 16:55 -0300, Adhemerval Zanella wrote:
> >
> > This changes seems to be arch independent and I would like to avoid adding
> > even more arch specific.  Is there any reason why this can't be used as
> > the default implementation?  Do you have number on different architecture
> > for it? 
> > 
> If other platform maintainer what to try this implementation and report
> that would be OK. 
>
> But I don't this it is correct or fair to ask Paul to prove a negative.
> These quests tend to be very labor intensive and usually don't work out
> (as really common) in the end.

I disagree. We've seen time and time again that well-written generic code beats target
specific code. So I would suggest to focus on improving the algorithms in generic code
rather than do target specific hacks that don't turn out to be useful in the long run.
This will not only result in more efficient code, but it is also far cheaper in development
time as it only needs to be done once and can be shared across all targets.

For this function I can't see why you'd ever want an ifunc unless there are cases where 
it doesn't beat the default powf implementation (presumably due to using 2 double 
precision divisions?). As it happens Szabolcs wrote a prototype powf that is not only
more accurate but also 4x faster, all using generic code. With these gains, target
specific math functions will be obsolete...

Wilco

             reply	other threads:[~2017-05-27 12:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-27 12:55 Wilco Dijkstra [this message]
2017-05-30 17:03 ` Paul Clarke
2017-06-02 16:06   ` Wilco Dijkstra
2017-06-02 16:28     ` Joseph Myers
  -- strict thread matches above, loose matches on Subject: below --
2017-05-25 17:47 Paul Clarke
2017-05-26 19:55 ` Adhemerval Zanella
2017-05-27  0:38   ` Steven Munroe

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=AM5PR0802MB2610870578CCA938957DAACC83FD0@AM5PR0802MB2610.eurprd08.prod.outlook.com \
    --to=wilco.dijkstra@arm.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=munroesj@linux.vnet.ibm.com \
    --cc=nd@arm.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).