This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2] New generic cosf
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Paul Clarke <pc at us dot ibm dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Joseph Myers <joseph at codesourcery dot com>, Matt Turner <mattst88 at gmail dot com>
- Date: Wed, 6 Dec 2017 11:14:45 -0800
- Subject: Re: [PATCH v2] New generic cosf
- Authentication-results: sourceware.org; auth=none
- References: <7aa9f1c0-cced-d24e-8982-4cdb346f1a6d@us.ibm.com>
On Wed, Dec 6, 2017 at 10:47 AM, Paul Clarke <pc@us.ibm.com> wrote:
> The same logic used in s_cosf.S version for x86 and powerpc
> is used to create a generic s_cosf.c, so there is no performance
> improvement in x86_64 and powerpc64.
>
> -- 8< --
> For s390, this is the improvement noted.
>
> Before patch:
> "cosf": {
> "": {
> "duration": 1.00388e+10,
> "iterations": 1.34624e+08,
> "max": 1655.32,
> "min": 4.243,
> "mean": 74.5692
> }
> }
> After patch:
> "cosf": {
> "": {
> "duration": 9.89888e+09,
> "iterations": 4.63972e+08,
> "max": 1089.59,
> "min": 6.789,
> "mean": 21.3351
> }
> }
>
> Tested on s390x, x86_64 and powerpc64le and powerpc32.
>
> I'll reply to this post with a diff with the latest generic s_sinf.c,
> since including it here could easily be confused with the patch body.
Please provide a diff against the latest generic s_sinf.c.
I assume both s_sinf.c and s_cosf.c use the same set of constant
tables. We should share them instead of duplication.
--
H.J.