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

Use a fast O(1) algorithm for exact_log2

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 11, 15
    • Fix Version/s: 15
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b14
    • CPU:
      generic
    • OS:
      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

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

              Dates

              Created:
              Updated:
              Resolved: