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

Implement JDK-8 default methods for IdentityHashMap

XMLWordPrintable

      A DESCRIPTION OF THE PROBLEM :
      IdentityHashMap are a useful part of Java collections and deserves optimizations. Not only does it serve special roles of comparing by identity, compared to regular HashMap, IdentityHashMap may have smaller memory footprints and can be a faster replacement for maps between identity-based objects, such as attached extra data.

      Currently, IdentityHashMap does not override a few JDK-8 methods, including getOrDefault, putIfAbsent, remove, replace, computeIfAbsent, computeIfPresent, merge. Overriding these may save a few hash table lookups and moderately boost the performance of IdentityHashMap.

      Note that due to JDK-8178355, the desired behavior of remove and replace are currently under contest and will probably be addressed separately.


            liach Chen Liang
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: