This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] log2 and log10 for wordsize-64
On Monday, May 14, 2012 22:00:09 Adhemerval Zanella wrote:
> On 05/14/2012 03:17 PM, Andreas Jaeger wrote:
> > You copied from sysdeps/ieee754/dbl-64 and reformatted the file which
> > makes a diff difficult (unless using -w). Could you send a separate
> > patch that reformats the two files, please?
>
> Sure, I'm attaching a patch with both e_log2.c and e_log10.c reformatted
> as I did for the wordsize-64 version. I believe now a compare will be
> easier.
>
> > zero seems to be unused in this code.
>
> Indeed, I removed it. Also removed it from original source.
>
> > Please add as comment: two1ln2 = 1/ln2
>
> Yeah, this remind that using an multiplication to replace a division on
> original code is not the best way to keep accuracy. I get rid of this
> and now the patch is using an division as original code. It shows now
> less performance, but it is still a gain.
>
> Thanks for the review.
>
> ---
>
> These were in my backlog for while. On x86_64 I observed an improvement
> of about 7% for log10 and about 9% for log2. And on PPC64 I observed an
> improvement of about 20% for log10 and about 9% for log2.
>
> Tested on ppc64 and x86_64.
>
> ---
>
> 2012-05-14 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
>
> * sysdeps/ieee754/dbl-64/wordsize-64/e_log10.c: New file.
> * sysdeps/ieee754/dbl-64/wordsize-64/e_log2.c: New file.
> * sysdeps/ieee754/dbl-64/e_log10.c: Fixing indents.
> * sysdeps/ieee754/dbl-64/e_log2.c: Likewise.
Mention the removal of zero.
Ok with that change.
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126