This is an archive of the discontinued LLVM Phabricator instance.

Use SmallVector instead of std::vector to manage storage of llvm::BitVector
ClosedPublic

Authored by serge-sans-paille on Apr 19 2021, 1:46 AM.

Details

Summary

This is a follow-up to https://reviews.llvm.org/D100387.
std::vector is not the best storage container here. My local benchmark (counting the number of instruction when compiling the sqlite3 amalgametion) yields the following:

  • std::vector<BitVector> -> 5,860,885,896
  • SmallVector<BitWord, 0> -> 5,858,991,997
  • `SmallVector<BitWord> -> 5,817,679,224

Diff Detail

Event Timeline

serge-sans-paille requested review of this revision.Apr 19 2021, 1:46 AM
serge-sans-paille created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 19 2021, 1:46 AM
thakis accepted this revision.Apr 20 2021, 8:38 AM

Thanks!

This revision is now accepted and ready to land.Apr 20 2021, 8:38 AM