[PATCH] D145464: [BOLT][NFC] Use llvm::is_contained

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 15:42:21 PDT 2023


kuhar added a comment.

FYI, by a quick scan through the patch, it seems like a likely pessimization. Currently, llvm::is_contained performs a linear scan to find the element, while `.find(x)` is typically O(1) or O(log n). Related discussion on this topic: https://reviews.llvm.org/D146061


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145464



More information about the llvm-commits mailing list