This is the mail archive of the libc-alpha@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]

Re: [PATCH] Improves __ieee754_exp() performance by greater than 5x on sparc/x86.


On Fri, 29 Dec 2017, Patrick McGehearty wrote:

> Version 9 of proposed patch.
> 
> Replaced get_rounding_mode and libc_fesetround() with SET_RESTORE_ROUND
> to avoid Intel rounding mode issue which showed as test failures in
> tgamma_upward. Adds noticable overhead for platforms that incur
> significant cost when rounding mode is already FE_TONEAREST. Added
> SET_RESTORE_ROUND to two more cases which resolved 1 ulp rounding
> errors for cexp().

Is the "5x" in the subject still correct?  (The subject line of a patch 
should be suitable for the summary line of the commit message, so must 
always reflect the current patch version accurately.  Likewise, the text 
of the patch submission, minus anything about changes relative to a 
previous patch version, must be suitable for the longer part of the commit 
message.)

> Expanded the scaling table from 64 entries to 128 entries, renaming
> invln2_64 to invln2_256 as well as ln2_64hi and ln2_64lo to ln2_256hi
> and ln2_256lo. That reduces the 1 ulp error rate per 1000 values from
> 1.6 to 0.6.

I think this expansion - and corresponding increase in cache usage - is a 
bad idea.  Table size should be kept down, consistent with suitable 
accuracy of e.g. < 1 ulp in this case.

This patch version also appears to be missing the fixups I made as part of 
committing the previous patch.  See 
<https://sourceware.org/ml/libc-alpha/2017-12/msg00649.html>.  In addition 
to the extra slowexp.c removals I noted there, I also needed to remove 
trailing whitespace from a few lines - you should make sure your patch 
does not include any additions of lines with trailing spaces, as the 
commit hooks will reject any push that adds such lines.

-- 
Joseph S. Myers
joseph@codesourcery.com


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