]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64: move memcmp checks upfront
authorMateusz Guzik <mjg@FreeBSD.org>
Sun, 31 Jan 2021 15:46:18 +0000 (16:46 +0100)
committerMateusz Guzik <mjg@FreeBSD.org>
Thu, 4 Feb 2021 17:59:10 +0000 (17:59 +0000)
commit88a580ebeea10e7bf9eb823dbbf48349eb8da540
tree35b6e9ccab07dba004e52a9332ccc6b6f913dc10
parent068f2402d28bf2ddee884c83be1dff3a7631569b
amd64: move memcmp checks upfront

This is a tradeoff which saves jumps for smaller sizes while making
the 8-16 range slower (roughly in line with the other cases).

Tested with glibc test suite.

For example size 3 (most common with vfs namecache) (ops/s):
before: 407086026
after: 461391995

The regressed range of 8-16 (with 8 as example):
before: 540850489
after: 461671032

(cherry picked from commit f1be262ec11c1c35e6485f432415b5b52adb505d)
lib/libc/amd64/string/memcmp.S
sys/amd64/amd64/support.S