public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/6406] Improve performance of libm wrapper functions.
       [not found] <bug-6406-131@http.sourceware.org/bugzilla/>
@ 2011-09-29  9:12 ` aj at suse dot de
  2011-10-08  8:46 ` drepper.fsp at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 12+ messages in thread
From: aj at suse dot de @ 2011-09-29  9:12 UTC (permalink / raw)
  To: glibc-bugs

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

Andreas Jaeger <aj at suse dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|aj at suse dot de           |drepper.fsp at gmail dot
                   |                            |com

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


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

* [Bug math/6406] Improve performance of libm wrapper functions.
       [not found] <bug-6406-131@http.sourceware.org/bugzilla/>
  2011-09-29  9:12 ` [Bug math/6406] Improve performance of libm wrapper functions aj at suse dot de
@ 2011-10-08  8:46 ` drepper.fsp at gmail dot com
  2011-10-08  9:21 ` jakub at redhat dot com
  2011-10-15 14:14 ` drepper.fsp at gmail dot com
  3 siblings, 0 replies; 12+ messages in thread
From: drepper.fsp at gmail dot com @ 2011-10-08  8:46 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #7 from Ulrich Drepper <drepper.fsp at gmail dot com> 2011-10-08 08:45:27 UTC ---
This is horrible.

Provide optimized inline versions of the standard functions and then fix the
compiler to reuse the result of function calls which convert the floating-point
numbers to the bitmasks.  If the inlined conversion function is marked 'const'
then the compiler should be able to determine that subsequent calls to


   bits = float2bits(floatvar);

return exactly the same result and should reuse it (given that floatvar hasn't
changed).

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


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

* [Bug math/6406] Improve performance of libm wrapper functions.
       [not found] <bug-6406-131@http.sourceware.org/bugzilla/>
  2011-09-29  9:12 ` [Bug math/6406] Improve performance of libm wrapper functions aj at suse dot de
  2011-10-08  8:46 ` drepper.fsp at gmail dot com
@ 2011-10-08  9:21 ` jakub at redhat dot com
  2011-10-15 14:14 ` drepper.fsp at gmail dot com
  3 siblings, 0 replies; 12+ messages in thread
From: jakub at redhat dot com @ 2011-10-08  9:21 UTC (permalink / raw)
  To: glibc-bugs

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

Jakub Jelinek <jakub at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at redhat dot com

--- Comment #8 from Jakub Jelinek <jakub at redhat dot com> 2011-10-08 09:21:01 UTC ---
For all these 4 functions has gcc its builtins, and if the gcc compiled code
using those builtins could be improved, a bug with particular testcases should
be filed against gcc.

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


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

* [Bug math/6406] Improve performance of libm wrapper functions.
       [not found] <bug-6406-131@http.sourceware.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2011-10-08  9:21 ` jakub at redhat dot com
@ 2011-10-15 14:14 ` drepper.fsp at gmail dot com
  3 siblings, 0 replies; 12+ messages in thread
From: drepper.fsp at gmail dot com @ 2011-10-15 14:14 UTC (permalink / raw)
  To: glibc-bugs

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

Ulrich Drepper <drepper.fsp at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #9 from Ulrich Drepper <drepper.fsp at gmail dot com> 2011-10-15 14:13:59 UTC ---
I'm closing this bug.  I optimized the wrappers *correctly*.  Anything else is
up to the compiler and those people who care about the niche architectures. 
They have to provide additions to their respective math_private.h.

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


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

* [Bug math/6406] Improve performance of libm wrapper functions.
  2008-04-15  1:51 [Bug math/6406] New: " sjmunroe at us dot ibm dot com
                   ` (6 preceding siblings ...)
  2008-06-26 14:13 ` sjmunroe at us dot ibm dot com
@ 2008-06-27 15:35 ` hjl dot tools at gmail dot com
  7 siblings, 0 replies; 12+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-06-27 15:35 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From hjl dot tools at gmail dot com  2008-06-27 15:34 -------
(In reply to comment #5)
> HJ this is the proposal I mentioned to you at GCC Summit. It way for each
> platform to inline the isnan, isinf, finite, etc test in the libm function
> wrappers (i.e w_pow.c)
> 
> Is uses macros defined in math-private.h to inline the various (redundent) tests
> required to set errno (if needed). The generic ./math/math_private.h maintains
> the status quo, but a platform can override math_private.h to define macros that
> work best for them.

I will take a look at x86-64.

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug math/6406] Improve performance of libm wrapper functions.
  2008-04-15  1:51 [Bug math/6406] New: " sjmunroe at us dot ibm dot com
                   ` (5 preceding siblings ...)
  2008-06-26 14:05 ` sjmunroe at us dot ibm dot com
@ 2008-06-26 14:13 ` sjmunroe at us dot ibm dot com
  2008-06-27 15:35 ` hjl dot tools at gmail dot com
  7 siblings, 0 replies; 12+ messages in thread
From: sjmunroe at us dot ibm dot com @ 2008-06-26 14:13 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From sjmunroe at us dot ibm dot com  2008-06-26 14:12 -------
HJ this is the proposal I mentioned to you at GCC Summit. It way for each
platform to inline the isnan, isinf, finite, etc test in the libm function
wrappers (i.e w_pow.c)

Is uses macros defined in math-private.h to inline the various (redundent) tests
required to set errno (if needed). The generic ./math/math_private.h maintains
the status quo, but a platform can override math_private.h to define macros that
work best for them.

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug math/6406] Improve performance of libm wrapper functions.
  2008-04-15  1:51 [Bug math/6406] New: " sjmunroe at us dot ibm dot com
                   ` (4 preceding siblings ...)
  2008-04-15 16:08 ` sjmunroe at us dot ibm dot com
@ 2008-06-26 14:05 ` sjmunroe at us dot ibm dot com
  2008-06-26 14:13 ` sjmunroe at us dot ibm dot com
  2008-06-27 15:35 ` hjl dot tools at gmail dot com
  7 siblings, 0 replies; 12+ messages in thread
From: sjmunroe at us dot ibm dot com @ 2008-06-26 14:05 UTC (permalink / raw)
  To: glibc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl dot tools at gmail dot
                   |                            |com


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug math/6406] Improve performance of libm wrapper functions.
  2008-04-15  1:51 [Bug math/6406] New: " sjmunroe at us dot ibm dot com
                   ` (3 preceding siblings ...)
  2008-04-15  2:28 ` sjmunroe at us dot ibm dot com
@ 2008-04-15 16:08 ` sjmunroe at us dot ibm dot com
  2008-06-26 14:05 ` sjmunroe at us dot ibm dot com
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: sjmunroe at us dot ibm dot com @ 2008-04-15 16:08 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From sjmunroe at us dot ibm dot com  2008-04-15 16:07 -------
marked the severity as enhancement

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug math/6406] Improve performance of libm wrapper functions.
  2008-04-15  1:51 [Bug math/6406] New: " sjmunroe at us dot ibm dot com
                   ` (2 preceding siblings ...)
  2008-04-15  2:17 ` sjmunroe at us dot ibm dot com
@ 2008-04-15  2:28 ` sjmunroe at us dot ibm dot com
  2008-04-15 16:08 ` sjmunroe at us dot ibm dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: sjmunroe at us dot ibm dot com @ 2008-04-15  2:28 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From sjmunroe at us dot ibm dot com  2008-04-15 02:27 -------
Created an attachment (id=2692)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=2692&action=view)
Example implementation of the x86_64 platform

This is an example for x86_64. So far it returns mixed results. the results are
disappointing for w_exp and w_log but an impressive 43% improvement for w_pow.
Not sure why the simpler w_exp and w_log case do not improve. As far as I can
tell the total path is shorter with this test patch.

This is only test and without this patch ./math/math_privated.h from the
previous patch maintains the existing implementation.

I am sure someone more skilled in x86_64 can devise a solution that retains the
gains for w_pow and resolves the problems with w_exp and w_log.

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug math/6406] Improve performance of libm wrapper functions.
  2008-04-15  1:51 [Bug math/6406] New: " sjmunroe at us dot ibm dot com
  2008-04-15  2:01 ` [Bug math/6406] " sjmunroe at us dot ibm dot com
  2008-04-15  2:02 ` sjmunroe at us dot ibm dot com
@ 2008-04-15  2:17 ` sjmunroe at us dot ibm dot com
  2008-04-15  2:28 ` sjmunroe at us dot ibm dot com
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: sjmunroe at us dot ibm dot com @ 2008-04-15  2:17 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From sjmunroe at us dot ibm dot com  2008-04-15 02:16 -------
The implementation above returns a performance improvement at the micro
benchmark level of 4% (w_exp), 8% (w_log), and 15% (w_pow) for power5 and power6
systems. based on GCC-4.3 and todays GLIBC cvs.

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug math/6406] Improve performance of libm wrapper functions.
  2008-04-15  1:51 [Bug math/6406] New: " sjmunroe at us dot ibm dot com
  2008-04-15  2:01 ` [Bug math/6406] " sjmunroe at us dot ibm dot com
@ 2008-04-15  2:02 ` sjmunroe at us dot ibm dot com
  2008-04-15  2:17 ` sjmunroe at us dot ibm dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: sjmunroe at us dot ibm dot com @ 2008-04-15  2:02 UTC (permalink / raw)
  To: glibc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rsa at us dot ibm dot com


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug math/6406] Improve performance of libm wrapper functions.
  2008-04-15  1:51 [Bug math/6406] New: " sjmunroe at us dot ibm dot com
@ 2008-04-15  2:01 ` sjmunroe at us dot ibm dot com
  2008-04-15  2:02 ` sjmunroe at us dot ibm dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: sjmunroe at us dot ibm dot com @ 2008-04-15  2:01 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From sjmunroe at us dot ibm dot com  2008-04-15 02:00 -------
Created an attachment (id=2691)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=2691&action=view)
A proposed method for inlining range checks in libm wrappers

This method defines macros in math_private.h that; declare transfer variables
(unions), transfer FP parms to a convenient (int) form for manipulation, 
defines macros for inline versions of ISNAN, ISINF, FINITE, SIGNBIT. 
the the DCL and XFER macros are separate to allow the flexibility for
scheduling.
This version includes the default math/math_private.h, examples uses for
w_exp.c w_log.c and w_pow.c and a platform specific override for powerpc.

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

end of thread, other threads:[~2011-10-15 14:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-6406-131@http.sourceware.org/bugzilla/>
2011-09-29  9:12 ` [Bug math/6406] Improve performance of libm wrapper functions aj at suse dot de
2011-10-08  8:46 ` drepper.fsp at gmail dot com
2011-10-08  9:21 ` jakub at redhat dot com
2011-10-15 14:14 ` drepper.fsp at gmail dot com
2008-04-15  1:51 [Bug math/6406] New: " sjmunroe at us dot ibm dot com
2008-04-15  2:01 ` [Bug math/6406] " sjmunroe at us dot ibm dot com
2008-04-15  2:02 ` sjmunroe at us dot ibm dot com
2008-04-15  2:17 ` sjmunroe at us dot ibm dot com
2008-04-15  2:28 ` sjmunroe at us dot ibm dot com
2008-04-15 16:08 ` sjmunroe at us dot ibm dot com
2008-06-26 14:05 ` sjmunroe at us dot ibm dot com
2008-06-26 14:13 ` sjmunroe at us dot ibm dot com
2008-06-27 15:35 ` hjl dot 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).