public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Paul A. Clarke" <pc@us.ibm.com>
To: Wilco Dijkstra <Wilco.Dijkstra@arm.com>,
	"'GNU C Library'" <libc-alpha@sourceware.org>
Subject: Re: RFC: Improve hypot performance
Date: Thu, 18 Nov 2021 10:15:28 -0600	[thread overview]
Message-ID: <20211118161528.GB22452@li-24c3614c-2adc-11b2-a85c-85f334518bdb.ibm.com> (raw)
In-Reply-To: <20211118154312.GA22452@li-24c3614c-2adc-11b2-a85c-85f334518bdb.ibm.com>

On Thu, Nov 18, 2021 at 09:43:12AM -0600, Paul A. Clarke via Libc-alpha wrote:
> On Thu, Nov 18, 2021 at 12:37:24PM +0000, Wilco Dijkstra wrote:
> > > On Power10, this implementation is still has a large delta compared to the
> > > current implementation:
> > 
> > It's obvious something went wrong here since it is slower than Adhemerval's
> > version - did you look at the generated code?
> > 
> > It should use fma, and no division or function calls (if you see calls to fmin/fmax
> > you need to set FAST_FMINMAX to 0).
> 
> Ugh. That was it. I missed that subtlety. (Why would I not want "FAST" to be
> true?  :-)
> 
> Anyway, with FAST_FMINMAX set to 1, the results are much better, and compare

That should say "with FAST_FMINMAX set to *0*".

> favorably with the current implementation:
> 
> current:
>   "hypot": {
>    "workload-random": {
>     "duration": 5.26088e+08,
>     "iterations": 4.8e+07,
>     "reciprocal-throughput": 8.2599,
>     "latency": 13.6604,
>     "max-throughput": 1.21067e+08,
>     "min-throughput": 7.32042e+07
>    }
>   }
> 
> with Adhemerval's patch and this patch with FAST_FMINMAX=1:
>   "hypot": {
>    "workload-random": {
>     "duration": 5.30541e+08,
>     "iterations": 5.2e+07,
>     "reciprocal-throughput": 7.22461,
>     "latency": 13.1808,
>     "max-throughput": 1.38416e+08,
>     "min-throughput": 7.58679e+07
>    }
>   }
> 
> PC

  reply	other threads:[~2021-11-18 16:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-17 15:58 Wilco Dijkstra
2021-11-17 19:02 ` Paul A. Clarke
2021-11-18 12:37   ` Wilco Dijkstra
2021-11-18 15:43     ` Paul A. Clarke
2021-11-18 16:15       ` Paul A. Clarke [this message]
2021-11-18 17:39         ` Wilco Dijkstra

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=20211118161528.GB22452@li-24c3614c-2adc-11b2-a85c-85f334518bdb.ibm.com \
    --to=pc@us.ibm.com \
    --cc=Wilco.Dijkstra@arm.com \
    --cc=libc-alpha@sourceware.org \
    /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).