[PATCH] D32060: BitVector: add iterators for bits that are set

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 13 17:41:33 PDT 2017


Instead of having the value type be an index, how about having it be a
range? Eg if bits,1,2,3,6,8,9 are set then have it return (1,4), (6,7), and
(8,10) on successive iterations. This should be much more efficient. For a
bits_unset iterator, the above would return (0,1), (4, 6), (7,8), (10,
size())
On Thu, Apr 13, 2017 at 5:29 PM Matthias Braun via Phabricator <
reviews at reviews.llvm.org> wrote:

> MatzeB added reviewers: dblaikie, chandlerc, mehdi_amini.
> MatzeB added a comment.
>
> Adding a few reviewers who often have comments on ADT changes.
>
>
> https://reviews.llvm.org/D32060
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170414/f5948249/attachment.html>


More information about the llvm-commits mailing list