]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
buffer.cc: is_zero() optimization
authorPiotr Dałek <piotr.dalek@ts.fujitsu.com>
Thu, 16 Jul 2015 08:13:01 +0000 (10:13 +0200)
committerPiotr Dałek <piotr.dalek@ts.fujitsu.com>
Tue, 4 Aug 2015 07:56:31 +0000 (09:56 +0200)
commite79ee92e8ca92776f991a3877c4105655f11d14d
tree8ab17b29b860aae28a38c89f9cfba86e86c72e95
parent2219200cb5bac1272fbee1e28d2fefecd5e657b7
buffer.cc: is_zero() optimization

Instead of checking byte-by-byte, check by 16 bytes first (only on x64 and
only when compiled with GCC), then by 4 bytes, and finally byte-by-byte.
This increases performance by a factor of up to 15x.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
src/common/buffer.cc