Fastutil in Java

Source: Internet
Author: User

Java provides many collection classes, such as arraylist and hashmap. But have you found that all these collection classes are generic, and sometimes you will find that using generic classes is slow. Where is the slowness? When it is slow, package installation and package splitting of the basic type will be slow. When you process a large amount of data, it is unacceptable when it is slow.

How can this be solved? We recommend that you use fastutil, which is produced by an Italian lab and mainly used on its webgraph.

 

The following is an introduction to the official website:

Fastutil extends the Java collections framework by providing type-specific maps, sets, lists and queues with a small memory footprint and fast access and insertion; provides also big (64-bit) arrays, sets and lists, and fast, practical I/O classes for binary and text files. it is free software distributed under the Apache license 2.0. it requires Java 6 or newer. the classes implement their standard counterpart interface (e.g ., map for maps) and can be plugged into existing code. moreover, they provide additional features (such as bidirectional iterators) that are not available in the standard classes. besides objects and primitive types, fastutil classes provide support for references, that is, objects that are compared using the equality operator rather than the equals () method. the sources are generated using a C Preprocessor, starting from a set of driver files. you can peek at thejavadoc-generated documentation. in particle, the overview explains the design choices used in fastutil.

 

I am currently writing many experiments on my own.CodeIn use, it is found that it is quite useful, and it is much better than the built-in JAVA, especially for basic types.

 

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.