java.util.HashMapSmoothieMapChronicleMap meets HashMap.
- Cannot hold less than 32 entries- Should be relatively large (> e.g 1000 entries)- Not designed for primitive valuesput
+ Worst-case latency is more than 100 times smaller than in HashMap
HashMap the longest one (when about 6m entries are already in the map) takes about 42 milliseconds.~ Latency grows linearly with the map size (as with HashMap), though with a very small coefficientget
~ Amortized performance of read (get(k)) and write operations on SmoothieMap is approximately equal to HashMap's performance (sometimes slower, sometimes faster, but always in the same ballpark+ On eventual growth it produces very little garbage - about 50 times less than e. g. HashMap by total size of objects, that are going to be GC'ed.+ Smaller memory footprint overall: only 45-55% of the size of HashMapput
- Bad latency when hash table resize is triggered- Runs a background Executor with resizer threads; could lead to problems or stalls if resizer threads starveput
~ As good latency as SmoothieMap+ Constant-time worst latenciesother operations
HashMap's, but is consistently slower~ Produces garbage on nearly the same rates as HashMap~ Comparable footprint to HashMapHashObjObjMapSmoothieMap, but more variance-XX:+UseCompressedOops, on average smaller than SmoothieMap, but with greater variance-XX:-UseCompressedOops, bigger than SmoothieMapCan you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs | 
| ← | Move to previous article | 
| → | Move to next article | 
| Ctrl+/ | Jump to the search field |