Quote Originally Posted by Nitrogen
Just for luck, this is how I implemented it.. using the suggested lookup-table.
What is the advantage over the original method? I.e. your algorithm compares with 2,4,8,16,32, which was exactly what the original did, only yours needs more memory.