5th April 2012, 2 min read Bit packing is fast, but integer logarithm is slow 4 thoughts on “Bit packing is fast, but integer logarithm is slow” Preston L. Bannister says: April 5, 2012 at 5:17 pm First, OR together all the integers (very fast), then right shift the result until you get all zeros (count the shifts). Or am I missing something? Luke says: April 5, 2012 at 6:58 pm Thanks for the blog and the code! I like your blog. You should get a github/bitbucket account so we can browse your past code easier. Thanks! Daniel Lemire says: April 5, 2012 at 7:10 pm @Luke Thanks you are right. Yes, I should create a repository on github for this code, you are right. Daniel Lemire says: April 5, 2012 at 8:15 pm @Preston As usual, you make me look like an idiot. 😉 I’m updating my blog post.
First, OR together all the integers (very fast), then right shift the result until you get all zeros (count the shifts).
Or am I missing something?
Thanks for the blog and the code! I like your blog.
You should get a github/bitbucket account so we can browse your past code easier.
Thanks!
@Luke
Thanks you are right.
Yes, I should create a repository on github for this code, you are right.
@Preston
As usual, you make me look like an idiot. 😉
I’m updating my blog post.