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

Use a fast O(1) algorithm for exact_log2

XMLWordPrintable

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

      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.

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

              Created:
              Updated:
              Resolved: