[PATCH 0/8] Add sinf/cosf/sincosf CORE-MATH implementations
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Mon Mar 30 17:51:07 GMT 2026
On 30/03/26 14:41, Wilco Dijkstra wrote:
> Hi Adhemerval,
>
> I ran these on Neoverse V2 and added my old patches with traces from a game engine.
> I'm seeing major slowdowns:
>
> sinf cosf
> random 45.4% 45.2%
> large 68.0% 53.4%
> huge 19.4% 9.8%
> box2d-small 58.2% 100.2%
> box2d-hard 56.7% 72.7%
> box2d-mixed 52.5% 54.4%
>
> The box2d results are far worse since they are traces rather than randomized,
> so they run much faster due to fewer mispredictions. Latency is 2-3x lower for the
> same reason.
Do you have a link how to run box2d?
>
> So improving the benchtests with traces would be a good idea, however it seems
> the CORE-MATH sinf/cosf implementation is significantly slower on modern cores
> even with random inputs.
CCing Paul. I used perf.sh from CORE-MATH and I am seeing the opposite, where
CORE-MATH shows 'less' branch mispredictions than current glibc one. But it
also does not apply to the benchtests that I have added (where the performance
is neutral).
I will try to come up with a better trace from speccpu2017.
More information about the Libc-alpha
mailing list