Java Collection Framework Koloboke detailed Chszs, not allowed to reprint without the Bo master. Permission to reprint should be marked by the author and blog home: Http://blog.csdn.net/chszs
The goal of Koloboke is to replace the standard Java collection and flow APIs to provide a more efficient implementation. The current version of Koloboke is mainly to replace Java.util.HashSet and Java.util.HashMap.
Koloboke provides an implementation of a complete set of primitive types, which avoids costly boxing/unboxing operations and saves the raw type of memory that is consumed by boxing.
In Koloboke, HashSet and HashMap are faster than other specialized implementations (such as GS collections, Fastutil, HTTP & Trove) because:
1) Koloboke uses less memory per entry than other libraries
2) Koloboke goal is to store keys and values in the same row cache
3) All methods are optimized rather than delegated to the framework class (Skeleton Class) like the Abstractset or Abstractmap classes
Koloboke's official website: http://chronicle.software/products/koloboke-collections/
Characteristics of the Koloboke:
1) Excellent compatible Java collection framework (Jcf,java collections Framework)
2) All original specialized collection classes inherit basic interfaces (such as collection, Set, Map)
3) can be used to replace the standard JCF
4) Koloboke API for Java 6 and Java 7 new method for forward compatibility with Java 8
5) fast-failing semantics
6) Support for null keys (optional), just like the Float.nan and Double.NaN keys in Java.util.HashMap.
When do I use chronicle map or Koloboke map?
Scenes using the Chronicle map:
1) storage of more than 500 million entry
2) Distributing the map between processes
3) using out-of-heap memory (off-heap memories), because the keys and values occupy too much memory, the JVM suffers from GC
Koloboke is a better choice when you do not want to share data between processes, and the storage entry is within 500 million lines.
The latest version of Koloboke is 0.6. Version 8. It can be used from the MAVEN repository:
<dependency> <groupId>net.openhft</groupId> <artifactId>koloboke-api-jdk8</artifactId> <version>0.6.8</version></dependency><dependency> <groupId>net.openhft</groupId> <artifactId>koloboke-impl-jdk8</artifactId> <version>0.6.8</version></dependency>
Gradle Dependent for
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‘}
can also be downloaded here: https://github.com/OpenHFT/Koloboke/releases
Java Collection Framework Koloboke detailed