public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ppluzhnikov at google dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug math/13932] New: x86_64 pow unexpectedly slow for some inputs
Date: Sat, 31 Mar 2012 02:23:00 -0000	[thread overview]
Message-ID: <bug-13932-131@http.sourceware.org/bugzilla/> (raw)

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

             Bug #: 13932
           Summary: x86_64 pow unexpectedly slow for some inputs
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
        AssignedTo: unassigned@sourceware.org
        ReportedBy: ppluzhnikov@google.com
    Classification: Unclassified


Created attachment 6310
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6310
test case

Attached test case shows that pow is over 10,000 slower for some inputs
than for other (nearby) inputs.

This was first noticed with eglibc-2.11, and reproduced with current
git trunk.

Results:

32-bit build:

./elf/ld.so --library-path .:math:dlfcn ./a.out
pow(0.562500, 1.5): 13.644814 calls/usec
pow(0.563250, 1.5): 13.647048 calls/usec
ratio:      1

64-bit build:

./elf/ld.so --library-path .:math:dlfcn ./a.out
pow(0.562500, 1.5): 0.000982 calls/usec
pow(0.563250, 1.5): 13.574397 calls/usec
ratio:  13828


perf shows:

# Events: 15K cycles
#
# Overhead  Command      Shared Object                               Symbol
# ........  .......  .................  ...................................
#
    63.31%    ld.so  libm.so            [.] __mul
    18.44%    ld.so  libm.so            [.] __ieee754_pow_sse2
    13.81%    ld.so  libm.so            [.] __exp1
     1.20%    ld.so  libm.so            [.] __pow
     1.09%    ld.so  libm.so            [.] sub_magnitudes
     0.43%    ld.so  a.out              [.] main
     0.38%    ld.so  libm.so            [.] __cpy
     0.21%    ld.so  libm.so            [.] add_magnitudes
     0.19%    ld.so  libm.so            [.] @plt

-- 
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.


             reply	other threads:[~2012-03-30 21:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-31  2:23 ppluzhnikov at google dot com [this message]
2012-12-13 16:45 ` [Bug math/13932] " manu at gcc dot gnu.org
2012-12-13 18:58 ` ppluzhnikov at google dot com
2013-01-04 11:33 ` siddhesh at redhat dot com
2013-01-04 23:24 ` herve at guillemet dot org
2013-03-08 14:08 ` manu at gcc dot gnu.org
2013-03-11  6:29 ` siddhesh at redhat dot com
2013-03-11  6:36 ` siddhesh at redhat dot com
2013-03-11  9:07 ` manu at gcc dot gnu.org
2013-03-11 10:19 ` siddhesh at redhat dot com
2013-08-24 21:39 ` vz-sourceware at zeitlins dot org
2013-12-03 18:42 ` jsm28 at gcc dot gnu.org
2014-02-06 18:27 ` [Bug math/13932] dbl-64 " jsm28 at gcc dot gnu.org
2014-05-07 15:42 ` jsm28 at gcc dot gnu.org
2014-06-12 19:26 ` fweimer at redhat dot com
2020-05-23 19:32 ` mtk.manpages at gmail dot com
2020-05-23 21:31 ` vincent-srcware at vinc17 dot net
2020-05-25 11:38 ` mtk.manpages at gmail dot com
2020-05-25 12:08 ` vincent-srcware at vinc17 dot net
2020-05-25 13:19 ` mtk.manpages 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-13932-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sources.redhat.com \
    /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).