public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Noah Goldstein <goldstein.w.n@gmail.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: GNU C Library <libc-alpha@sourceware.org>,
	"H . J . Lu" <hjl.tools@gmail.com>
Subject: Re: [PATCH 0/5] Use generic sinf, cosf, and sincosf for i686
Date: Tue, 31 May 2022 16:48:03 -0500	[thread overview]
Message-ID: <CAFUsyfKWATgQrxg0vShaV-RO03HvzarimS7OyfDqmJHQj5z9pw@mail.gmail.com> (raw)
In-Reply-To: <20220531213502.227895-1-adhemerval.zanella@linaro.org>

On Tue, May 31, 2022 at 4:35 PM Adhemerval Zanella via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> Performance seems to be similar, with generic implementation showing
> slight better performance for sinf large inputs and for sincosf.
>
> Although generic implementation shows slight lower precision (the
> ulp data required some adjustments), the code size shows a good
> improvement:
>

How much loss of precision?

> i686-linux-gnu-master$ size math/s_sinf-sse2.os math/s_cosf-sse2.os
> math/s_sincosf-sse2.os
>    text    data     bss     dec     hex filename
>    1555       0       0    1555     613 math/s_sinf-sse2.os
>    1551       0       0    1551     60f math/s_cosf-sse2.os
>    1754       0       0    1754     6da math/s_sincosf-sse2.os
>
> i686-linux-gnu-patched$ size math/s_sinf-sse2.os math/s_cosf-sse2.os
> math/s_sincosf-sse2.os
>    text    data     bss     dec     hex filename
>    1059       0       0    1059     423 math/s_sinf-sse2.os
>    1067       0       0    1067     42b math/s_cosf-sse2.os
>     993       0       0     993     3e1 math/s_sincosf-sse2.os
>
> And it also simplifies the code base a lot with less assembly
> implementations.
>
> Adhemerval Zanella (5):
>   benchtests: Add workload name for cosf
>   i686: Use generic cosf implementation for SSE2 version
>   i686: Use generic sinf implementation for SSE2 version
>   benchtests: Add workload name for sincosf
>   math: Use generic sinf implementation for SSE2 version
>
>  benchtests/cosf-inputs                        |   2 +-
>  benchtests/sincosf-inputs                     |   1 +
>  sysdeps/i386/i686/fpu/multiarch/Makefile      |   3 +
>  .../i386/i686/fpu/multiarch/libm-test-ulps    |  11 +
>  sysdeps/i386/i686/fpu/multiarch/s_cosf-sse2.S | 552 -----------------
>  sysdeps/i386/i686/fpu/multiarch/s_cosf-sse2.c |   3 +
>  .../i386/i686/fpu/multiarch/s_sincosf-sse2.S  | 585 ------------------
>  .../i386/i686/fpu/multiarch/s_sincosf-sse2.c  |   3 +
>  sysdeps/i386/i686/fpu/multiarch/s_sinf-sse2.S | 565 -----------------
>  sysdeps/i386/i686/fpu/multiarch/s_sinf-sse2.c |   3 +
>  sysdeps/ieee754/flt-32/s_cosf.c               |   5 +
>  sysdeps/ieee754/flt-32/s_sinf.c               |   5 +
>  12 files changed, 35 insertions(+), 1703 deletions(-)
>  delete mode 100644 sysdeps/i386/i686/fpu/multiarch/s_cosf-sse2.S
>  create mode 100644 sysdeps/i386/i686/fpu/multiarch/s_cosf-sse2.c
>  delete mode 100644 sysdeps/i386/i686/fpu/multiarch/s_sincosf-sse2.S
>  create mode 100644 sysdeps/i386/i686/fpu/multiarch/s_sincosf-sse2.c
>  delete mode 100644 sysdeps/i386/i686/fpu/multiarch/s_sinf-sse2.S
>  create mode 100644 sysdeps/i386/i686/fpu/multiarch/s_sinf-sse2.c
>
> --
> 2.34.1
>

  parent reply	other threads:[~2022-05-31 21:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31 21:34 Adhemerval Zanella
2022-05-31 21:34 ` [PATCH 1/5] benchtests: Add workload name for cosf Adhemerval Zanella
2022-05-31 21:47   ` H.J. Lu
2022-05-31 21:34 ` [PATCH 2/5] i686: Use generic cosf implementation for SSE2 version Adhemerval Zanella
2022-05-31 21:46   ` H.J. Lu
2022-05-31 21:35 ` [PATCH 3/5] i686: Use generic sinf " Adhemerval Zanella
2022-05-31 21:47   ` H.J. Lu
2022-05-31 21:35 ` [PATCH 4/5] benchtests: Add workload name for sincosf Adhemerval Zanella
2022-05-31 21:48   ` H.J. Lu
2022-05-31 21:35 ` [PATCH 5/5] math: Use generic sinf implementation for SSE2 version Adhemerval Zanella
2022-05-31 21:51   ` H.J. Lu
2022-06-01 12:42     ` Adhemerval Zanella
2022-06-01 15:14       ` H.J. Lu
2022-06-01 16:06         ` Adhemerval Zanella
2022-05-31 21:48 ` Noah Goldstein [this message]
2022-05-31 21:49   ` [PATCH 0/5] Use generic sinf, cosf, and sincosf for i686 H.J. Lu
2022-05-31 21:53     ` Noah Goldstein
2022-06-01 12:36       ` Adhemerval Zanella
2022-06-01 13:12         ` Adhemerval Zanella
2022-06-01 16:23 Wilco Dijkstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFUsyfKWATgQrxg0vShaV-RO03HvzarimS7OyfDqmJHQj5z9pw@mail.gmail.com \
    --to=goldstein.w.n@gmail.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).