public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar <siddhesh@gotplt.org>
To: "Wilco Dijkstra" <Wilco.Dijkstra@arm.com>,
	"Ondřej Bílka" <neleai@seznam.cz>
Cc: "libc-alpha@sourceware.org" <libc-alpha@sourceware.org>, nd <nd@arm.com>
Subject: Re: [PATCH 2/6] Remove slow paths from sin/cos
Date: Fri, 09 Mar 2018 19:31:00 -0000	[thread overview]
Message-ID: <41b81cbf-b27a-07c2-1945-4c201327f162@gotplt.org> (raw)
In-Reply-To: <DB6PR0801MB2053DA71ED8159B28382D9E383DE0@DB6PR0801MB2053.eurprd08.prod.outlook.com>

On Saturday 10 March 2018 12:36 AM, Wilco Dijkstra wrote:
> Exactly, it's rare for sin/cos input to be > 10, largest I've ever seen was around 1000. 
> There is a case to be made for making wildly out or range inputs an error or just return 0.0
> rather than using insanely accurate range reduction (the result is going to be equally wrong
> either way), but that's a different discussion.

To be clear, I do not object to the patchset, it is the right way
forward.  I would like to see clearer documentation as to why we decided
to drop this path in this patch and what the impact of that is.  In that
sense, it would be nice to have a better rationale in the commit log
than "I've never seen inputs that big".

> Fast range reduction of up to 2^27 is a huge overkill, we could get a significant speedup by
> reducing this range.
>
> The 2nd level range reduction (2^27 till 2^48) is so pointless that there is absolutely no
> reason keep it. There is about a 2.3x slowdown in this range due to __branred being
> braindead slow.

Thanks, all this should be part of the commit log.  However, from what I
understand, this particular patch will result in a regression (since
IIRC reduce_and_compute is slower) but the following patch will fix that
and improve things.

Siddhesh

  reply	other threads:[~2018-03-09 19:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09 15:46 Wilco Dijkstra
2018-03-09 16:17 ` Siddhesh Poyarekar
2018-03-09 18:19   ` Ondřej Bílka
2018-03-09 18:52     ` Zack Weinberg
2018-03-09 23:05       ` Steve Ellcey
2018-03-10  0:52         ` Joseph Myers
2018-03-12 15:36           ` Wilco Dijkstra
2018-03-12 15:46             ` Zack Weinberg
2018-03-12 16:10             ` Joseph Myers
2018-03-12 21:13               ` Wilco Dijkstra
2018-03-09 19:06     ` Wilco Dijkstra
2018-03-09 19:31       ` Siddhesh Poyarekar [this message]
2018-03-12 18:09         ` Wilco Dijkstra
2018-03-13  8:53           ` Siddhesh Poyarekar

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=41b81cbf-b27a-07c2-1945-4c201327f162@gotplt.org \
    --to=siddhesh@gotplt.org \
    --cc=Wilco.Dijkstra@arm.com \
    --cc=libc-alpha@sourceware.org \
    --cc=nd@arm.com \
    --cc=neleai@seznam.cz \
    /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).