]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64: check for small size in memmove, memcpy and memset
authormjg <mjg@FreeBSD.org>
Fri, 21 Sep 2018 12:27:36 +0000 (12:27 +0000)
committermjg <mjg@FreeBSD.org>
Fri, 21 Sep 2018 12:27:36 +0000 (12:27 +0000)
commit36c0c430ca4b0556bd95d61ab0865f895286ea10
treeca8cc43e97ca1de5fe77d443f78dd0f910124e99
parent59e98bdc013cd9067c55c143f0c8cc5cce10a474
amd64: check for small size in memmove, memcpy and memset

If the size is 15 bytes or less avoid spinning up rep just to copy the 8
bytes. In my tests on EPYC and old Intel microarchs without ERMS (like
Westmere) it provided a nice win over the current version (e.g. for EPYC
memset with 15 bytes of size goes from 59712651 ops/s to 70600095) all
while almost not pessimizing the other cases.

Data collected during package building shows that < 16 sizes are pretty
common.

Verified with the glibc test suite.

Approved by: re (kib)
sys/amd64/amd64/support.S