3 ms·
It's covered pretty well in the paper they link to: "On the Java platform we used for our experiments, we estimate that we can compute and write bitwise ORs at
by SwellJoe 12y ago
It's covered pretty well in the paper they link to:
"On the Java platform we used for our experiments, we estimate that we can compute and write bitwise ORs at 700 million 64-bit words per second. If we further compute the cardinality of the result as we produce it, our estimated speed falls to about 500 million words per second. That is, we suffer a speed penalty of about 30% because we maintain the cardinality. (We find that this penalty effectively disappears when using an equivalent optimized implementation written in C.) In contrast, competing methods like WAH and Concise must spend time to decode
the word type before performing a single bitwise operation. These checks may cause expensive branch mispredictions or impair superscalar execution."
They also discuss why this is so (specialized instructions in modern processors, and modern processors and superscaler allowing execution of multiple such operations per cycle). All of this is in the section that begins "Bitmap vs. Bitmap".