[PATCH] D83849: [TableGen] Reserve space in a vector to reduce the number of mallocs.

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 21:14:48 PDT 2020


wenlei added a comment.

> Reserve space in a vector to reduce the number of mallocs. The size of VTList is usually 1, but often 6 or 7.

It seems to me that `SmallVector` fits the need better than `std::vector` here?

Also curious how did you discover this?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83849/new/

https://reviews.llvm.org/D83849





More information about the llvm-commits mailing list