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

Add count_leading_zeros utility

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: