public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: Bu Le <cityubule@qq.com>, gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: [AArch64][Spec2017]Question about mlow-precision-div optimization.
Date: Thu, 27 Feb 2020 22:08:00 -0000	[thread overview]
Message-ID: <AM5PR0801MB2035BA8735F2A4C011DA549583EB0@AM5PR0801MB2035.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <tencent_1D5FC3C356416758C6700E7A364D47073F06@qq.com>

Hi,

> These data I presented is acquired from a cortex-a57 CPU.

>The point that you mentioned in some modern CPU, fdiv is faster than the reciprocal 
> approximation is a new aspect I haven’t come cross.

Well on Cortex-A57 division is also faster, eg. lbm_r is ~3% slower using reciprocal divide.

> And do you think it worth us providing a parameter to alter the iteration so that the
> accuracy can be a trade-off of speed.

What do you mean? We already have -mlow-precision-div (and -sqrt/-recip-sqrt).

> Since spec2017 does result check and will give a test report which indicates miscomputed cases, 
> I suppose the performance improvement is valid.

Try perf stat to show instruction counts, and if they are not increasing due to the extra reciprocal
operations, the benchmark is running incorrectly even if it passes basic checks.

Cheers,
Wilco

  reply	other threads:[~2020-02-27 17:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25 15:27 Wilco Dijkstra
2020-02-26 13:01 ` =?gb18030?B?QnUgTGU=?=
2020-02-27 22:08   ` Wilco Dijkstra [this message]
2020-03-03 16:22     ` Richard Sandiford
2020-03-04 13:26       ` Wilco Dijkstra
     [not found]       ` <tencent_5C7FA4816F6BB9D3236327A73C9BA5A39105@qq.com>
2020-03-06 15:24         ` 回复: " Richard Sandiford
  -- strict thread matches above, loose matches on Subject: below --
2020-02-23  4:06 Bu Le

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=AM5PR0801MB2035BA8735F2A4C011DA549583EB0@AM5PR0801MB2035.eurprd08.prod.outlook.com \
    --to=wilco.dijkstra@arm.com \
    --cc=cityubule@qq.com \
    --cc=gcc-help@gcc.gnu.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).