[PATCH v7] malloc: Optimize small memory clearing for calloc
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Thu Dec 5 16:00:12 GMT 2024
Hi,
> That works. But looks like the alternative code has no performance
> benefit in Xeon.
No surprises there - it makes sense to do a few more stores to avoid
a branch, however always doing 9 is overkill. A good memset doesn't
do this either, generally implementations use overlapping stores that
handle eg. all sizes between 64 and 128 without any branches.
Cheers,
Wilco
More information about the Libc-alpha
mailing list