Use SmallVector instead of std::vector to manage storage of llvm::BitVector
authorserge-sans-paille <sguelton@redhat.com>
Mon, 19 Apr 2021 08:14:21 +0000 (10:14 +0200)
committerserge-sans-paille <sguelton@redhat.com>
Wed, 21 Apr 2021 05:31:28 +0000 (07:31 +0200)
commitd9806334d1a42a0338d4db703249d13108f1ef4d
treea35e9e73202e2bbe063a3dba7894fc12cc4220d3
parentdd56715326028187d35d4a0afe87b942a1073752
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
llvm/include/llvm/ADT/BitVector.h