This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Improves __ieee754_exp() performance by greater than 5x on sparc/x86.
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Patrick McGehearty <patrick dot mcgehearty at oracle dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Mon, 1 Jan 2018 01:36:32 +0000
- Subject: Re: [PATCH] Improves __ieee754_exp() performance by greater than 5x on sparc/x86.
- Authentication-results: sourceware.org; auth=none
- References: <1514590916-114435-1-git-send-email-patrick.mcgehearty@oracle.com>
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