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

Use a fast O(1) algorithm for exact_log2

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 15
    • 11, 15
    • hotspot
    • b14
    • generic
    • generic

    Description

      exact_log2() is used a great deal in HotSpot, especially at startup. exact_log2() uses a naive iterative algorithm. We should do better, and in particular we should use an algorithm that compilers commonly optimize well, so that constant expressions that use exact_log2 are computed at compilation time.

      Attachments

        Activity

          People

            aph Andrew Haley
            aph Andrew Haley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: