[PATCH] D23384: Use a byte array as an internal buffer of BitVector.

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 14:07:57 PDT 2016


On Thu, Aug 11, 2016 at 1:50 PM, Rui Ueyama <ruiu at google.com> wrote:

> On Thu, Aug 11, 2016 at 1:45 PM, Daniel Berlin <dberlin at dberlin.org>
> wrote:
>
>> On Thu, Aug 11, 2016 at 1:39 PM, Rui Ueyama <ruiu at google.com> wrote:
>>
>>> This patch is to store bits in the little-endian order regardless of
>>> host endianness (or, in other words, use a byte array as the internal
>>> storage instead of a word array), so that you can easily set/get internal
>>> buffers. We could define a new class for doing this, but is this bad for
>>> the existing BitVector?
>>>
>>
>> Let's see!
>> Have you benchmarked it?
>>
>
> Nope, will do. Do we have a benchmark suite or something?
>

Yeah, folks measure compile time on the large stuff in tests and other
random code in as less noisy a way as they can.


> How do you usually measure the compiler performance?
>

For something like this, you could probably just microbenchmark the set
operations/etc before and after and that would IMHO, be okay enough.

Pretty sure you should be able to get https://github.com/google/benchmark
working with these functions without too much trouble.

In fact, BitVector.h only depends on countTrailingZeros and alignTo (if you
comment out the llvm/support/MathExtras.h, that is what fails)

You can just copy those definitions pretty easily.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160811/df6e6b7c/attachment.html>


More information about the llvm-commits mailing list