]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Two small refactoring for better inlining
authorSiying Dong <siying.d@fb.com>
Thu, 14 Sep 2017 22:41:19 +0000 (15:41 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 14 Sep 2017 22:41:49 +0000 (15:41 -0700)
commit885b1c682e85391beb7f26a842e2128e3653bd4a
tree67430749101849b0b76a608a754503b79337bc74
parentffac68367fb5c6fcc6fbd22c3555d227a2b77695
Two small refactoring for better inlining

Summary:
Move uncommon code paths in RangeDelAggregator::ShouldDelete() and IterKey::EnlargeBufferIfNeeded() to a separate function, so that the inlined strcuture can be more optimized.

Optimize it because these places show up in CPU profiling, though minimum. The performance is really hard measure. I ran db_bench with readseq benchmark against in-memory DB many times. The variation is big, but it seems to show 1% improvements.
Closes https://github.com/facebook/rocksdb/pull/2877

Differential Revision: D5828123

Pulled By: siying

fbshipit-source-id: 41a49e229f91e9f8409f85cc6f0dc70e31334e4b
db/dbformat.cc
db/dbformat.h
db/range_del_aggregator.cc
db/range_del_aggregator.h