Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use BitArray for boolean arrays #1128

Closed
JeffBezanson opened this issue Aug 8, 2012 · 6 comments
Closed

use BitArray for boolean arrays #1128

JeffBezanson opened this issue Aug 8, 2012 · 6 comments
Labels
needs decision A decision on this change is needed

Comments

@JeffBezanson
Copy link
Sponsor Member

Once #987 is settled, we should add BitArray to Base and use it for bool arrays. The goal is to eliminate the copy&pasted code, and settle the contentious issue of BitArray's type parameter.

@ViralBShah
Copy link
Member

The is certainly a good idea. Would be nice to have a performance comparison to ensure that there are no hidden surprises.

@StefanKarpinski
Copy link
Sponsor Member

My performance tests of BitArray NA masks for data frames indicate that BitArrays perform quite nicely and give the expected speedups. They seem quite solid.

@ViralBShah
Copy link
Member

That is really awesome.

-viral

On 12-Aug-2012, at 10:07 PM, Stefan Karpinski wrote:

My performance tests of BitArray NA masks for data frames indicate that BitArrays perform quite nicely and give the expected speedups. They seem quite solid.


Reply to this email directly or view it on GitHub.

@JeffBezanson
Copy link
Sponsor Member Author

Sparse bitarrays would be cool too.

@ViralBShah
Copy link
Member

Sparse bitarrays can be done by not having the nzval array in SparseMatrixCSC. The entries in rowval can indicate the bits that are set to true, and the rest are assumed to be false.

The entire SparseMatrixCSC implementation needs to be made aware of this, and it should be the most efficient way to do sparse bitarrays.

-viral

On 13-Aug-2012, at 2:56 AM, Jeff Bezanson wrote:

Sparse bitarrays would be cool too.


Reply to this email directly or view it on GitHub.

@StefanKarpinski
Copy link
Sponsor Member

This is done by fec3387. Now it's mostly a matter of fine-tuning the behavior and interfaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs decision A decision on this change is needed
Projects
None yet
Development

No branches or pull requests

3 participants