This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 6/6] Remove slow paths from sin/cos
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: Siddhesh Poyarekar <siddhesh at gotplt dot org>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Cc: nd <nd at arm dot com>
- Date: Mon, 12 Mar 2018 17:31:18 +0000
- Subject: Re: [PATCH 6/6] Remove slow paths from sin/cos
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco dot Dijkstra at arm dot com;
- Nodisclaimer: True
- References: <DB6PR0801MB20536DE50F24E83BB7B6182383DE0@DB6PR0801MB2053.eurprd08.prod.outlook.com>,<37a3d699-e7aa-a411-f9bf-54aa1491a154@gotplt.org>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Siddhesh Poyarekar wrote:
> The intention of keeping the inlines was to avoid duplicating code
> across files. With this change one now must remember to make changes in
> both files at all times, increasing the chances of an error. Do you see
> any gain from duplicating code?
I had lots of issues due to parts of functions being included in sincos.c, so I had to
disable sincos during development. The new version is much easier to maintain.
This patch on its own gives a 16-20% speedup between 0 and 8*PI (this speedup
continues up to 2^27). The overall speedup of sincos is 48% over this range, and
between 0 and PI it is 66% faster. So I'd say specializing the small cases in sincos
gives a significant gain.
Wilco