[PATCH 0/8] Add sinf/cosf/sincosf CORE-MATH implementations
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Mon Mar 30 17:41:05 GMT 2026
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.
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.
Cheers,
Wilco
More information about the Libc-alpha
mailing list