Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8217869

Add count_leading_zeros utility

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 13
    • None
    • hotspot
    • b06

      While RegMask::find_highest_bit isn't a very hot method, its implementation is quite inefficient compared to what's possible using compiler intrinsics like gcc's __builtin_clz. For platforms without intrinsics a more efficient implementation can be used.

      Introduce a count_trailing_zeros utility method, initially for 32-bit unsigned integer values.

            redestad Claes Redestad
            redestad Claes Redestad
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: