• S
    Three code-level optimization to Iterator::Next() · edcbb369
    Siying Dong 提交于
    Summary:
    Three small optimizations:
    (1) iter_->IsKeyPinned() shouldn't be called if read_options.pin_data is not true. This may trigger function call all the way down the iterator tree.
    (2) reuse the iterator key object in DBIter::FindNextUserEntryInternal(). The constructor of the class has some overheads.
    (3) Move the switching direction logic in MergingIterator::Next() to a separate function.
    
    These three in total improves readseq performance by about 3% in my benchmark setting.
    Closes https://github.com/facebook/rocksdb/pull/2880
    
    Differential Revision: D5829252
    
    Pulled By: siying
    
    fbshipit-source-id: 991aea10c6d6c3b43769cb4db168db62954ad1e3
    edcbb369
db_iter.cc 42.6 KB