Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lzham_math/total_bits possible improvement #2

Open
GoogleCodeExporter opened this issue Nov 1, 2015 · 1 comment
Open

lzham_math/total_bits possible improvement #2

GoogleCodeExporter opened this issue Nov 1, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Not a bug just a possibility of improvement.

Instead of:

while (v > 0U) { v >>= 1; l++; }

you can use one of the algorithms presented here:

http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogObvious

Original issue reported on code.google.com by milosz.k...@gmail.com on 18 Aug 2011 at 9:01

@GoogleCodeExporter
Copy link
Author

Thanks Milo - I'll look into this when I release the first "official" non-alpha 
version. I hope to do this within the next month or so, but I'm stretched 
pretty thin right now.

Original comment by richge...@gmail.com on 20 May 2012 at 2:38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant