Add some "inline" annotation to DBIter functions (#5217)

Summary:
My compiler doesn't inline DBIter::Next() to arena wrapped iterator, even if it is a direct forward. Adding this annotation makes it inlined. It might not always work but inlinging this function to arena wrapped iterator always feels like the right decision.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5217

Differential Revision: D15004086

Pulled By: siying

fbshipit-source-id: a4cffd79c6fb092669a3a90633c9aa5e494f8a66
main
Siying Dong 6 years ago committed by Facebook Github Bot
parent efa948741c
commit 7a73adda9c
  1. 12
      db/db_iter.cc

@ -231,12 +231,12 @@ class DBIter final: public Iterator {
return Status::InvalidArgument("Unidentified property.");
}
void Next() final override;
void Prev() override;
void Seek(const Slice& target) override;
void SeekForPrev(const Slice& target) override;
void SeekToFirst() override;
void SeekToLast() override;
inline void Next() final override;
inline void Prev() final override;
inline void Seek(const Slice& target) final override;
inline void SeekForPrev(const Slice& target) final override;
inline void SeekToFirst() final override;
inline void SeekToLast() final override;
Env* env() { return env_; }
void set_sequence(uint64_t s) {
sequence_ = s;

Loading…
Cancel
Save