]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/buffer: switch crc cache to single pair instead of map 18906/head
authorPiotr Dałek <piotr.dalek@corp.ovh.com>
Mon, 13 Nov 2017 13:49:07 +0000 (14:49 +0100)
committerPiotr Dałek <piotr.dalek@corp.ovh.com>
Mon, 13 Nov 2017 14:30:11 +0000 (15:30 +0100)
commit0c2f2dc3b47049655e4f8b581bb7a189ffd78918
tree01e8f687d7111f7597dd89718d31436f7044ec74
parentb8357ec69423f6f8094a6d799c27b76317f70d9c
common/buffer: switch crc cache to single pair instead of map

Most bufferptrs have just one entry in their caches, so it makes
perfect sense to store just that. As population and destruction of
std::map isn't free, it yields noticeable perf increase, around 12%
in case of bufferptrs containing just 4k of data, with more as the
bufferptrs get smaller.

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