top | item 40394809

(no title)

klowrey | 1 year ago

Why not use the built in BitVector type that has specialized code for things like xor?

https://docs.julialang.org/en/v1/base/arrays/#Base.BitArray

discuss

order

lunaticd|1 year ago

it doesn't seem to have better support for things like xor and count_ones. I believe the main use case is comparisons.

klowrey|1 year ago

Combined with broadcasting its fast.

Under the hood it’s doing the same thing with a vector of ints (64 bits for bitvectors) and all the bulk manipulation is handled that way so SIMD in inherent as well. Worth a shot.