XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Major Major
    • 9.1.4.Final, 9.2.0.Final
    • 9.2.0.Final
    • Off Heap
    • None

      Currently many places do

      ice = ice = offHeapEntryFactory.fromMemory(address)
      if (wrappedKey.equalsWrappedBytes(ice.getKey()))
      

      In cases where this ends up being a miss, we read the entire value which is wasteful. And the CPU may not have the key in the cache size we read the object into memory. Where as if we do

      if (offHeapEntryFactory.equalsKey(address, key))
      ice = ice = offHeapEntryFactory.fromMemory(address)
      

      we know that CPU is reading from the address location twice in a row, which has a very high chance of still being in CPU caches which should hopefully provide better performance. We also then don't have to read the entire ice object in memory unless there was a hit.

      We also should change performGet to return the address instead of the ice. This way callers can use this address for other optimizations such as when doing a evict or compute which have to read the entry first before a remove.

              wburns@redhat.com Will Burns
              wburns@redhat.com Will Burns
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: