HomePhabricator

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

Authored by serge-sans-paille on Mon, Apr 19, 1:14 AM.

Description

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

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 amalgamation) yields the
following:

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

Differential Revision: https://reviews.llvm.org/D100744