Github user afs commented on a diff in the pull request:

    https://github.com/apache/jena/pull/57#discussion_r29939141
  
    --- Diff: 
jena-base/src/main/java/org/apache/jena/atlas/lib/cache/CacheSimple.java ---
    @@ -37,120 +37,81 @@
     
     public class CacheSimple<K,V> implements Cache<K,V>
     {
    -    private final V[] values ; 
    -    private final K[] keys ;
    -    private final int size ;
    -    private int currentSize = 0 ;
    -    private BiConsumer<K,V> dropHandler = null ;
    +   private Map<K,V> internalCache;
    +   
    --- End diff --
    
    If keys K1 and K2 have the same short hash, then one adding K2 overwrites 
k1 in CacheSimple but in a java Map, you end up with two entries K1 and K2, 
with internal reorganisation as needed and the Map is bigger. CacheSimple is a 
sort of fixed size map.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to