This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/13932] New: x86_64 pow unexpectedly slow for some inputs


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]