[llvm-dev] Interest in fast BitVector?
David Greene via llvm-dev
llvm-dev at lists.llvm.org
Thu Sep 20 10:19:59 PDT 2018
Some time ago I developed a fast BitVector class to use in some research
here. It uses expression templates to fuse operation loops and runs
much faster than the existing BitVector for some important use-cases.
It also has the ability to efficiently report if a BitVector's contents
changed after some operation. For example:
ETBitVector A = ...
ETBitVector B = ...
ETBitVector C = ...
bool Changed = A.assign(A & B | ~C); // Bit operation loops fused
Using this resulted in 100x or more speedup over BitVector. Obviously,
the speedup is greater the more operations are chained together. For a
simple A.assign(A & B) it wouldn't be terribly faster. But the ability
to report a change efficiently can be useful even for simple operations.
I based this off an old version of BitVector. At the time it was a
drop-in replacement but it would need some updating to conform to the
current BitVector interface.
Before I do that work, is there any interest in this?
-David
More information about the llvm-dev
mailing list