in reply to Re^2: reliable get position of leftmost bit in large integers
in thread reliable get position of leftmost bit in large integers

I am only prototyping the pure Perl version for a C implementation.

If your doing it in C, it is very efficient compared to other methods; and works well as an Inline::C routine.

It originates from Bit Twiddling Hacks.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
  • Comment on Re^3: reliable get position of leftmost bit in large integers

Replies are listed 'Best First'.
Re^4: reliable get position of leftmost bit in large integers
by wollmers (Scribe) on Mar 12, 2015 at 14:54 UTC

    I knew the Bit Twiddling page. But I hoped to get it shorter.

    Sure, pure C does not have the overhead.

    Helmut Wollmersdorfer