Apply the replacement throughout BOLT.
Details
Details
- Reviewers
rafauler maksfb - Group Reviewers
Restricted Project - Commits
- rG2eae9d8eb2f6: [BOLT][NFC] Use llvm::is_contained
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
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
Comment Actions
Thanks for a heads up! It'd be great to specialize is_contained for const- or log-time lookup.