Java Collection framework Koloboke

Source: Internet
Author: User

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'}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.