public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "nadavhalahmi560 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/100855] pow run time gfortran vs ifort
Date: Thu, 03 Jun 2021 08:21:26 +0000	[thread overview]
Message-ID: <bug-100855-4-RKt0RWzMaG@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100855-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100855

--- Comment #7 from Nadav Halahmi <nadavhalahmi560 at gmail dot com> ---
(In reply to Dominique d'Humieres from comment #6)
> On a MacOS, Corei9, 2.4Ghz, the program runs in ~1s, almost indpendtly of
> the option level.
> 
> This PR remind me an old problem in which the transcendental functions were
> almost slower for REAL(4) then for REAL(8) on some Unix distros (Fedora(?),
> based of "correct rounding").
> 
> What are your timings if you replace
> 
>     real :: sum, n, q
> 
> with
> 
>     real(8) :: sum, n, q
> 
> and
> 
>             sum = sum + (i ** (0.05 + n))
> 
> with
> 
>             sum = sum + (i ** (0.05_8 + n))
> 
> ?

Timings for this change (notice the result was also changed):
gnu:
   150945570.07620683     
Time =  6.303 seconds.
intel:
   150945570.076207     
Time =  2.349 seconds.

So gnu is indeed faster for real(8), but the result was changed.

  parent reply	other threads:[~2021-06-03  8:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 13:01 [Bug fortran/100855] New: " nadavhalahmi560 at gmail dot com
2021-06-01 16:19 ` [Bug fortran/100855] " kargl at gcc dot gnu.org
2021-06-01 17:20 ` anlauf at gcc dot gnu.org
2021-06-02  7:52 ` rguenth at gcc dot gnu.org
2021-06-02  9:37 ` nadavhalahmi560 at gmail dot com
2021-06-02  9:38 ` nadavhalahmi560 at gmail dot com
2021-06-02 16:34 ` dominiq at lps dot ens.fr
2021-06-03  8:21 ` nadavhalahmi560 at gmail dot com [this message]
2021-06-03 14:24 ` dominiq at lps dot ens.fr
2021-06-05 11:59 ` dominiq at lps dot ens.fr
2021-06-06  8:52 ` nadavhalahmi560 at gmail dot com

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=bug-100855-4-RKt0RWzMaG@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).