[PATCH 6/6] Remove slow paths from sin/cos
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Mon Mar 12 17:31:00 GMT 2018
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
More information about the Libc-alpha
mailing list