public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alexander Monakov <amonakov@ispras.ru>
To: Paul Zimmermann <Paul.Zimmermann@inria.fr>
Cc: gcc-help@gcc.gnu.org, stephane.glondu@inria.fr, sibid@uvic.ca
Subject: Re: slowdown with -std=gnu18 with respect to -std=c99
Date: Tue, 3 May 2022 15:12:28 +0300 (MSK)	[thread overview]
Message-ID: <603c2c46-93d3-6ec1-ef5-a592ef566ed@ispras.ru> (raw)
In-Reply-To: <mwsfpqc01v.fsf@tomate.loria.fr>

On Tue, 3 May 2022, Paul Zimmermann via Gcc-help wrote:
> > I can reproduce a difference, but in my case it's simply because in -std=gnuXX
> > mode (as opposed to -std=cXX) GCC enables FMA contraction, enabling the last few
> > steps in the benchmarked function to use fma instead of separate mul/add
> > instructions.
> 
> but then you should get better (i.e. smaller) timings with -std=gnuXX than
> with -std=cXX, instead of worse timings as we get?

Right, for me -std=gnuXX is faster. But for you it's slower by almost 1.5x,
that's quite a lot and should be easy to spot on 'perf report' profile.

> >     perf record -e instructions:P -c 500000 ./perf ...
> 
> thank you, we'll investigate that.

Good luck! I'm curious what you'll find, please let me know.

Alexander

  reply	other threads:[~2022-05-03 12:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03  8:28 Paul Zimmermann
2022-05-03  9:09 ` Alexander Monakov
2022-05-03 11:45   ` Paul Zimmermann
2022-05-03 12:12     ` Alexander Monakov [this message]
2022-05-05  8:57   ` Stéphane Glondu
2022-05-05 14:31     ` Stéphane Glondu
2022-05-05 14:41       ` Marc Glisse
2022-05-05 14:56         ` Alexander Monakov
2022-05-06  7:46           ` Paul Zimmermann
2022-05-06  9:27             ` Alexander Monakov
2022-05-07  6:11               ` Paul Zimmermann
2022-05-11 13:26               ` Alexander Monakov
2022-05-05 17:50         ` Paul Zimmermann

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=603c2c46-93d3-6ec1-ef5-a592ef566ed@ispras.ru \
    --to=amonakov@ispras.ru \
    --cc=Paul.Zimmermann@inria.fr \
    --cc=gcc-help@gcc.gnu.org \
    --cc=sibid@uvic.ca \
    --cc=stephane.glondu@inria.fr \
    /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).