Java Collection framework Koloboke
The Java Collection framework Koloboke describes how Koloboke aims to replace standard Java collections and stream APIs to provide more efficient implementation. Koloboke provides a complete set of original types to avoid overhead packing/unpacking operations and save the memory consumed by original types.
In Koloboke, HashSet and HashMap are faster than other specialized implementations (such as GS collections, fastutil, HTTP & Trove), because:
1) compared with other libraries, Koloboke uses less memory for each entry
2) Koloboke aims to store keys and values in the same cache row.
3) All methods have been optimized, rather than being delegated to the framework Class like the AbstractSet Class or AbstractMap Class)
Koloboke Official Website: http://chronicle.software/products/koloboke-collections/
Features of Koloboke:
1) excellent compatibility with Java Collection frameworks (JCF, Java Collections Framework)
2) All original specialized Collection classes inherit basic interfaces (such as Collection, Set, and Map)
3) can be used to replace standard JCF
4) Koloboke API for Java 6 and Java 7: A New Method compatible with Java 8
5) Fast failure Semantics
6) supports the null key (optional), just like the Float. NaN and Double. NaN keys in java. util. HashMap.
When can I use Chronicle Map or Koloboke Map?
Use Case of Chronicle Map:
1) more than 0.5 billion entries are stored.
2) distributed Map between processes
3) Off-Heap Memory is used. JVM suffers from GC because keys and values occupy too much Memory.
Koloboke is a better choice if you do not want to share data between processes and store less than 0.5 billion entries.
The latest version of Koloboke is 0.6.8. You can use it from the Maven Repository:
net.openhftkoloboke-api-jdk80.6.8net.openhftkoloboke-impl-jdk80.6.8
Gradle dependency is
dependencies { // `jdk8` instead of `jdk6-7` if you use Java 8 compile 'net.openhft:koloboke-api-jdk6-7:0.6.8' runtime 'net.openhft:koloboke-impl-jdk6-7:0.6.8'}