[PATCH] D76466: [ADT] CoalescingBitVector: Add advanceToLowerBound iterator operation

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 20 09:11:06 PDT 2020


aprantl added inline comments.


================
Comment at: llvm/include/llvm/ADT/CoalescingBitVector.h:320
+    /// This is useful if \p Index is close to the current iterator position.
+    /// However, unlike \ref find(), this has worst-case O(n) performance.
+    void advanceToLowerBound(IndexT Index) {
----------------
aprantl wrote:
> The doxygen comment of `find()` doesn't actually say what its complexity is. Might be nice to add that information.
It would also be good to explain when to use this function over advance_to().


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

https://reviews.llvm.org/D76466





More information about the llvm-commits mailing list