about summary refs log tree commit diff
path: root/math/auto-libm-test-out-log2
diff options
context:
space:
mode:
authorNoah Goldstein <goldstein.w.n@gmail.com>2022-10-18 17:44:06 -0700
committerNoah Goldstein <goldstein.w.n@gmail.com>2022-10-19 17:31:03 -0700
commit4af6844aa5d3577e327f15dd877a38a043cb236a (patch)
tree8032676690c0b37aee3c26e5dde1bb600289ef4e /math/auto-libm-test-out-log2
parentb79f8ff26aa6151d2d2167afcddcd1ec46cfbc81 (diff)
downloadglibc-4af6844aa5d3577e327f15dd877a38a043cb236a.tar.gz
glibc-4af6844aa5d3577e327f15dd877a38a043cb236a.tar.xz
glibc-4af6844aa5d3577e327f15dd877a38a043cb236a.zip
x86: Optimize memrchr-evex.S
Optimizations are:
1. Use the fact that lzcnt(0) -> VEC_SIZE for memchr to save a branch
   in short string case.
2. Save several instructions in len = [VEC_SIZE, 4 * VEC_SIZE] case.
3. Use more code-size efficient instructions.
	- tzcnt ...     -> bsf ...
	- vpcmpb $0 ... -> vpcmpeq ...

Code Size Changes:
memrchr-evex.S      :  -29 bytes

Net perf changes:

Reported as geometric mean of all improvements / regressions from N=10
runs of the benchtests. Value as New Time / Old Time so < 1.0 is
improvement and 1.0 is regression.

memrchr-evex.S      : 0.949 (Mostly from improvements in small strings)

Full results attached in email.

Full check passes on x86-64.
Diffstat (limited to 'math/auto-libm-test-out-log2')
0 files changed, 0 insertions, 0 deletions