]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
powerpc64: Rewrite strcmp in asm to take advantage of word size
authorjhibbits <jhibbits@FreeBSD.org>
Tue, 23 Apr 2019 02:53:53 +0000 (02:53 +0000)
committerjhibbits <jhibbits@FreeBSD.org>
Tue, 23 Apr 2019 02:53:53 +0000 (02:53 +0000)
commitb46e60fcb16610f34cdbcc6dd85dde0023afe862
tree9737c9460d1e45f77f7dcc6542d3d7fda326fee4
parentffca4becd77c4b0957860407672a674c4493d931
powerpc64: Rewrite strcmp in asm to take advantage of word size

Summary:
Optimize strcmp for powerpc64.
Data is loaded by double words and cmpb intruction is used to find '\0'.

Some performance gain rates between the current and the optimized solution:

String size (bytes) Gain rate
<=8 0.59%
<=16 1.92%
32 3.02%
64 5.60%
128 10.16%
256 18.05%
512 30.18%
1024 42.82%

Submitted by: alexandre.yamashita_eldorado.org.br,
leonardo.bianconi_eldorado.org.br
Differential Revision: https://reviews.freebsd.org/D15220
lib/libc/powerpc64/string/Makefile.inc [new file with mode: 0644]
lib/libc/powerpc64/string/strcmp.S [new file with mode: 0644]