Performance-wise, how good is the Guava library?

I have been through the Google Guava library and founds lots of good, usable data structures in it.

If anyone else has used it then can you provide feedback on how it performed when used with huge data sets? Basically I am looking for BigO notation for its operations.

Thanks in advance

Answers


Guava contributor here.

Um, what's there to say? All hash-based (and enum-based) collections have the single-entry operations in constant time, exactly as you'd expect. (HashMultiset, LinkedHashMultiset, ConcurrentHashMultiset, HashBiMap, HashBasedTable, ImmutableSet, ImmutableMap, EnumMultiset, EnumBiMap, etc. all fall into that category.) All tree-based/sorted collections have logarithmic time for their single-entry operations, including TreeMultiset, ImmutableSortedMap, and ImmutableSortedSet.

Among multimaps, well, the documentation basically tells you the Map and the value-collection implementations, and you can figure it out from there. HashMultimap is basically a HashMap to HashSets, LinkedHashMultimap is a LinkedHashMap to LinkedHashSets, ArrayListMultimap is a HashMap to ArrayLists, LinkedListMultimap is a LinkedHashMap to LinkedLists (performance-wise, if not technically true), TreeMultimap is a TreeMap to TreeSets, ImmutableSetMultimap is an ImmutableMap to ImmutableSets, ImmutableListMultimap is an ImmutableMap to ImmutableLists.

The only thing that might not be self-evident is probably that the SortedMultiset implementations provide subMultiset().size() operations in O(log n) time, which you couldn't do just with a JDK TreeMap<E, Integer>.

All the views of collections (we like views a lot) return in constant time and have the asymptotics you'd expect.

Is there anything more specific you were concerned about?

(In general, Guava is basically the core libraries Google uses in production, which I'd like to think is pretty strong evidence that the utilities perform satisfactorily in heavy-duty environments. Additionally, Guava is constantly being improved, and you get those improvements basically for free.)


Need Your Help

Error: Program "/NDK-build" not found in PATH

android c++ opencv ubuntu android-ndk

I need help. I'm trying to install and configure OpenCV 2.4.7 library in my computer (Ubuntu 12.04). After run OpenCV samples appears those errors in my Console: