]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
inline_memory: optimized mem_is_zero for non-X64 15307/head
authorPiotr Dałek <piotr.dalek@corp.ovh.com>
Fri, 26 May 2017 09:39:58 +0000 (11:39 +0200)
committerPiotr Dałek <piotr.dalek@corp.ovh.com>
Fri, 26 May 2017 09:39:58 +0000 (11:39 +0200)
commit9b5a1a4a326c243ff12571ad0537778bf7193d6a
tree47340333148a012578e1962504a3678d77bf08ae
parent6b6c14f8c7f298f536c09a1df09ec4b809aeb186
inline_memory: optimized mem_is_zero for non-X64

mem_is_zero is fast for X64 where 128-bit registers are available,
but it's very easy to optimze it for 32-bit Intel and ARM CPUs as
well, the speed won't be anywhere near the fastest one but still almost
7x faster than regular byte-by-byte check.
Now with extra test to check for corner cases that may pop with such
implementations.

Signed-off-by: Piotr Dałek <piotr.dalek@corp.ovh.com>
src/include/inline_memory.h
src/test/bufferlist.cc