• S
    Introduce InternalIteratorBase::NextAndGetResult() (#5197) · 992dfc78
    Siying Dong 提交于
    Summary:
    In long scans, virtual function calls of Next(), Valid(), key() and value() are not trivial. By introducing NextAndGetResult(), Some of the Next(), Valid() and key() calls are consolidated into one virtual function call to reduce CPU.
    Also did some inline tricks and add some "final" randomly in some functions. Even without the "final" annotation, most Next() calls are inlined with -O3, but sometimes with a final it is inlined by O2 too. It doesn't hurt to add those final annotations.
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/5197
    
    Differential Revision: D14945977
    
    Pulled By: siying
    
    fbshipit-source-id: 7003969f9a5f1d5717f0bda503b91d19ba75ed88
    992dfc78
db_iter.cc 54.1 KB