MHN
Add a comment on Hacker News →
1 of 29 comments
  1. I think applying a newton-raphson approach instead of just choosing a fixed pivot could result in fewer comparisons.

    On the other hand, a comparison is a dirty cheap operation, even using bit masks and shifts I doubt it will have a big performance impact, unless we're dealing with very very big arrays.