[all-commits] [llvm/llvm-project] d98063: Use SmallVector instead of std::vector to manage s...

serge-sans-paille via All-commits all-commits at lists.llvm.org
Tue Apr 20 22:33:09 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d9806334d1a42a0338d4db703249d13108f1ef4d
      https://github.com/llvm/llvm-project/commit/d9806334d1a42a0338d4db703249d13108f1ef4d
  Author: serge-sans-paille <sguelton at redhat.com>
  Date:   2021-04-21 (Wed, 21 Apr 2021)

  Changed paths:
    M llvm/include/llvm/ADT/BitVector.h

  Log Message:
  -----------
  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




More information about the All-commits mailing list