Translation www.java-performance.com------JDK class

Source: Internet
Author: User

Large HashMap overview:jdk, Fastutil, Goldman Sachs, HPPC, Koloboke, trove-january version:a Quick overview of Al L Major Libraries implementing hashmaps.

    • Fastutil 6.6.0 turned out to be consistently fast. It may become even faster if it would introduce any other storage structures except 2 arrays for keys and values.
    • Koloboke is getting second in many tests, but it still outperforms fastutil in int-int tests.
    • Gs implementation is good enough, but is slower than Fastutil and Koloboke.
    • JDK Maps is pretty good for object-object maps provided so can tolerate the extra memory consumption and you WI ll call  HashMap  constructor with required capacity = Actual_capacity/fill_factor + 1  to avoid rehashing.
    • trove suffers from using , mod  operation for array index calculations AND HPPC  is too slow due to a extra underlying array (for cell states).

Large HashMap overview:jdk, Fastutil, Goldman Sachs, HPPC, Koloboke, trove-january version:
http://java-performance.info/hashmap-overview-jdk-fastutil-goldman-sachs-hppc-koloboke-trove-january-2015/
Realize the HashMap of the mainstream library.
Keywords: hash map, Fastutil, GS collections, HPPC, Koloboke, Trove.
1. Fastutil 6.6.0 is still consistently fast. It may also be faster if you do not use a 2 array to store keys and values and use other storage structures.
2. Koloboke is ranked second in many tests, but is more than fastutil when the key value type is Int-int test.
3. The JDK behaves fairly well in object-object type (object-object) map. This requires you to endure additional memory consumption, and the additional consumption is that the actual capacity/fill factor + 1 (capacity = Actual_capacity/fill_factor + 1) is required to avoid re-hashing when constructing hashmap.
4. Trove suffers from the criticism of using modulo operations (mods) in array subscript calculations, and using an implicit extra array to preserve the state of the array elements makes the HPPC very slow. (HPPC http://labs.carrotsearch.com/hppc.html)

Translation www.java-performance.com------JDK class

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.