diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2018-09-27 14:05:44 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2018-09-27 14:05:44 +0000 |
commit | a8e3f99ec190ee5c11413878b7fd75578e542808 (patch) | |
tree | c37badec5597cf34b5a360a8b5b658e8e064d237 /sys/conf/files.mips | |
parent | e3f284eee7af7bcebf4bc96f64a9bc9e8e9d692b (diff) | |
download | src-a8e3f99ec190ee5c11413878b7fd75578e542808.tar.gz src-a8e3f99ec190ee5c11413878b7fd75578e542808.zip |
amd64: implement memcmp in assembly
Both the in-kernel C variant and libc asm variant have very poor performance.
The former compiles to a single byte comparison loop, which breaks down even
for small sizes. The latter uses rep cmpsq/b which turn out to have very poor
throughput and are slower than a hand-coded 32-byte comparison loop.
Depending on size this is about 3-4 times faster than the current routines.
Reviewed by: kib
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D17328
Notes
Notes:
svn path=/head/; revision=338963
Diffstat (limited to 'sys/conf/files.mips')
-rw-r--r-- | sys/conf/files.mips | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/conf/files.mips b/sys/conf/files.mips index 07448f44497c..1977fb9dcce2 100644 --- a/sys/conf/files.mips +++ b/sys/conf/files.mips @@ -65,6 +65,7 @@ libkern/cmpdi2.c optional mips | mipshf | mipsel | mipselhf libkern/ucmpdi2.c optional mips | mipshf | mipsel | mipselhf libkern/ashldi3.c standard libkern/ashrdi3.c standard +libkern/memcmp.c standard # cfe support dev/cfe/cfe_api.c optional cfe |