HomeFreeBSD

powerpc64: Rewrite strcmp in asm to take advantage of word size

Description

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

Details

Provenance
jhibbitsAuthored on
Differential Revision
D15220: strcmp optimization for powerpc64
Parents
rS346587: MFC r346254: config(8): replace opteq with a call to strcasecmp
Branches
Unknown
Tags
Unknown