public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "neleai at seznam dot cz" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/15424] modf benchtest gives bogus results
Date: Fri, 10 May 2013 09:16:00 -0000	[thread overview]
Message-ID: <bug-15424-131-RaEuZTXv0L@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-15424-131@http.sourceware.org/bugzilla/>

http://sourceware.org/bugzilla/show_bug.cgi?id=15424

--- Comment #2 from Ondrej Bilka <neleai at seznam dot cz> 2013-05-10 09:16:24 UTC ---
On Fri, May 10, 2013 at 08:19:48AM +0000, siddhesh at redhat dot com wrote:
> http://sourceware.org/bugzilla/show_bug.cgi?id=15424
> 
> Siddhesh Poyarekar <siddhesh at redhat dot com> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|NEW                         |WAITING
>                  CC|                            |siddhesh at redhat dot com
>          AssignedTo|unassigned at sourceware    |siddhesh at redhat dot com
>                    |dot org                     |
> 
> --- Comment #1 from Siddhesh Poyarekar <siddhesh at redhat dot com> 2013-05-10 08:19:48 UTC ---
> Does this happen with latest master?  Changing from fixed iterations to fixed
> time showed such spurious results with bench-modf once (likely because it was
> not rebuilt), which went away when I did a bench-clean and rebuilt it.
>
Now it shows following results. According to them atan is ten times
faster than modf which is clearly wrong.

atan(): ITERS:4.48268e+09: TOTAL:7.79352s, MAX:166.672ns, MIN:0.638ns,
5.7518e+08 iter/s
atan(768bits): ITERS:4.8324e+08: TOTAL:9.83724s, MAX:38.805ns, MIN:17.654ns,
4.91235e+07 iter/s
modf(): ITERS:6.8975e+08: TOTAL:9.53964s, MAX:193.448ns, MIN:4.486ns,
7.23035e+07 iter/s

A following benchmark takes  8.9s which is order of magnitude more than
what benchtest tells.

extern double modf (double, double *);
int main(){ int i;
  double x=0;
  double ret=0;
  double f;
  for(i=0;i<1000000000;i++){
     ret+=modf(x,&f);
    x+=0.1;
  }
  return ret;
}

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


  parent reply	other threads:[~2013-05-10  9:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-01 22:00 [Bug libc/15424] New: " ondra at iuuk dot mff.cuni.cz
2013-05-10  8:19 ` [Bug libc/15424] " siddhesh at redhat dot com
2013-05-10  9:16 ` neleai at seznam dot cz [this message]
2013-05-17 12:01 ` siddhesh at redhat dot com
2013-05-17 13:40 ` siddhesh at redhat dot com
2014-06-13 18:09 ` fweimer at redhat 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-15424-131-RaEuZTXv0L@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@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).