public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/30179] New: Generic fmod and remainder are slower than x87 implementations
@ 2023-02-27 16:35 hjl.tools at gmail dot com
  2023-02-27 16:35 ` [Bug math/30179] " hjl.tools at gmail dot com
  0 siblings, 1 reply; 2+ messages in thread
From: hjl.tools at gmail dot com @ 2023-02-27 16:35 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30179

            Bug ID: 30179
           Summary: Generic fmod and remainder are slower than x87
                    implementations
           Product: glibc
           Version: 2.38
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---
            Target: x86-64

Created attachment 14722
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14722&action=edit
A testcase

Performance of generic fmod and remainder highly depends on input values.
Performance
of x87 (fprem/fprem1) implementations can be much faster.  On Intel Coffee
Lake,

[hjl@gnu-cfl-3 fmod-2]$ make
gcc -O2   -c -o test.o test.c
gcc    -c -o x87.o x87.S
gcc -static -o x87 test.o x87.o
gcc -static -o sse test.o -lm
time ./sse
3.15user 0.00system 0:03.15elapsed 99%CPU (0avgtext+0avgdata 684maxresident)k
0inputs+0outputs (0major+39minor)pagefaults 0swaps
time ./x87
0.25user 0.00system 0:00.25elapsed 99%CPU (0avgtext+0avgdata 680maxresident)k
0inputs+0outputs (0major+37minor)pagefaults 0swaps
[hjl@gnu-cfl-3 fmod-2]$

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug math/30179] Generic fmod and remainder are slower than x87 implementations
  2023-02-27 16:35 [Bug math/30179] New: Generic fmod and remainder are slower than x87 implementations hjl.tools at gmail dot com
@ 2023-02-27 16:35 ` hjl.tools at gmail dot com
  0 siblings, 0 replies; 2+ messages in thread
From: hjl.tools at gmail dot com @ 2023-02-27 16:35 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30179

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |hjl.tools at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-27 16:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-27 16:35 [Bug math/30179] New: Generic fmod and remainder are slower than x87 implementations hjl.tools at gmail dot com
2023-02-27 16:35 ` [Bug math/30179] " hjl.tools at gmail dot com

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