Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
May 2010 archive![]() 06/01/10 | ||||||||
Line: 330 to 330 | ||||||||
| ||||||||
Added: | ||||||||
> > | 07/02/10Fixed the bug in my rank function, turns out I did miss a +1. So now I have a working rank structure that I can build and query for any length sequence. The current implementation uses two paralleluint64_t arrays to store the two (first and second) bitsequences. Before I start an implementation that stores precalculated values though, I want to do a few experiments with one array that holds each block sequentially.
I also did a few tests with the new calculation method ( ~second & first) & (0xFFFF...FF >> BITS-i ). I tried making an array of length BITS to store the precalculated masks for every i . That way might lead to fewer operations (not really sure on that point). Preliminary tests didn't show much difference, especially on -O3 . The strange thing is, I actually compiled a minimal rank function using either of the two calculations as assembly, and at -O3 , there wasn't even any difference in the assembly code! Strange, since the two aren't really numerically equivalent, just "popcount equivalent".
To do:
|