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

Optimize ResourceHashtableBase::iterate_all using _number_of_entries

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • None
    • hotspot
    • None
    • b06
    • generic
    • generic

      Current implementation iterates all buckets when lambda function doesn't return false. If the occupancy of a hashable is low, eg. an empty hashable with 100 buckets, we have to emit 100 loads to finish one iteration_all

      ResourceHashtableBase::_number_of_entries is the number of nodes in the hashtable. we can leverage it to quit iteration earlier.

            xliu Xin Liu
            xliu Xin Liu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: