SlideShare a Scribd company logo
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Collections.compare(() -> {
JDK; Apache; Eclipse; Guava...});
Donald Raab
Leonardo Lima
Nikhil J. Nanivadekar
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Abstract
— Collections are a staple in any programming language: the need to collect, sort or iterate over values is needed by nearly all
developers.
The Java language introduced the Collections framework long ago and that's what many (incredibly not all!) developers learn
when they start programming. It has plenty to offer, but many find it lacking: the amount of collection libraries as active open
source projects demonstrate the need for something else.
If we were to search to find a holistic comparison of famous collection libraries, there is not much literature available. The talk
is poised to fill this gap. In this session, we will explore the most common collections (pun intended!) frameworks, what they
have to offer and what you should consider for your next project.
We will also show common programmer use cases, how each library handles them and the impact on memory, processing
power and ease of use/coding.
After this session, you will be able to choose the right bag for your tricks!
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Agenda
1. Brief introduction of who we are (2 min)
2. A bit of history about the Java Util Collections framework (6 min), with a timeline of Java releases and what was
introduced in its collection
3. Show the gaps in use cases from that timeline (6 min)
4. Introduce a timeline with other collection frameworks (6 min, 2 min per framework: Apache, Eclipse, Google)
5. Comparison table with use case / packages diagram (5+ min)
6. Examples of said use cases in IDE (10 min)
7. Actual tests with speed and memory use per solution (rest of time)
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
About the Speakers
—Donald Raab
• Managing Director at BNY Mellon
• Based in Jersey City, New Jersey
• Creator of Eclipse Collections
• Member of JSR 335 Expert Group (Lambdas/Streams 4 Java)
• Presenter at Devoxx US, JavaOne, EclipseCon, JVMLS, GIDS
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
About the Speakers
—Leonardo Lima
• Computer engineer, server & embedded sw developer
• From São Paulo, Brasil, currently in Austin, TX
• CTO at V2COM
• Spec Lead – JSR363 – Units of Measurement
• V2COM’s Representative at JCP Executive Committee
[about.me/leomrlima]
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
—Nikhil J. Nanivadekar
• Mechanical Engineer
• Software developer
• Vice President Technology at Goldman Sachs
• From Pune, India, currently in Salt Lake City, Utah
About the Speakers
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
java.util.Collections
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
java.util Collections
— Java Collection Framework has been around since 1998/JDK 1.2.
Very basic but critical collection support for Java.
— Interfaces: Maps and Collections (List, Set, Queue, Deque)
— Implementations: Basic and Concurrent versions of the
interfaces, sorted and concurrent as well
— Algorithms: Sorting, Shuffling, Routine Data Manipulation,
Searching, Composition
— Best way to get started is using the simple and concurrent tutorials
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Java 2
1998
• Interfaces
• Collection
• List
• Set
• Map
• List
• SortedMap
Java 5
2005
• Generics
• For-each loop
• Interfaces
• Iterable
• Queue
• ConcurrentMap
• BlockingQueue
Java 6
2006
•Interfaces
•NavigableSet
•NavigableMap
•Deque
•BlockingDeque
•ConcurrentNavigableMap
Java 7
2011
• Interfaces
• TransferQueu
e
Java 8
2014
• Lambdas
• Method Refs
• Default Methods
• Interfaces
• BaseStream
• Stream
• IntStream
• LongStream
• DoubleStream
• Collector
• Spliterator
• PrimitiveIterator
Java 9
2017
• JPMS
• Collection
Factory
methods
• New Stream
APIs
• Improved
Javadoc
• Private
interface
methods
Java Collections Framework
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
!java.util.Collections?
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
!java.util Collections
— We’re comparing 4 other collection frameworks,
and JDK 8 Collections. In alphabetical order:
— Apache Commons Collections (v 4.1)
— Eclipse Collections (fka GS Collections, v 9.0)
— Google Guava’s Collections (v23)
— Vavr’s Collections (fka Javaslang, v0.9)
— (links are to their user guide/documentation!)
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Collection Frameworks Timeline
Java 2
1998
• Jakarta
Collections 1.0
• 2001
• Apache
Collections 3.0
(AC)
• 2004
Java 6
2006
• Google
Collections 1.0
• Dec. 2009
Java 7
2011
• Google Guava
10.0
• Sept. 2011
• GS Collections
1.0
• Jan. 2012
• AC 4.0
• Nov. 2013
Java 8
2014
• Javaslang 1.0
• Mar. 2014
• AC 4.1
• Nov. 2015
• Eclipse Collections
7.0 (EC)
• Jan. 2016
• EC 8.0 (Java 8)
• Sept. 2016
• Guava 20.0
• Oct. 2016
• Javaslang 2.1a
• Nov. 2016
Java 9
2017
• Guava 21.0
(Java 8)
• Jan. 2017
• EC 8.1
• Mar. 2017
• Vavr 0.9
• May 2017
• Guava 22.0
• May 2017
• EC 8.2
• Jun 2017
• Guava 23.0
• Aug 2017
• EC 9.0
• Sep 2017
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Collections.compare();
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Use Case – Deck of Cards
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Problem Statement – Deck of Cards
1. Create Deck of Cards
• Store Cards in an “ImmutableList”
• (Cartesian product of Suit x Rank)
• Group the cards by Suit in an “ImmutableListMultimap”
• (Group By)
2. Get the number of cards
• Count By Suit returning “Multiset” or “Bag”
• Count By Rank returning “Multiset” or “Bag”
3. Deal five hands of five cards each
• Return the cards as an “ImmutableList” of five Sets of five cards
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Problem Statement – Deck of Cards
1. Create Deck of Cards
• Store Cards in an “ImmutableList”
• (Cartesian product of Suit x Rank)
• Group the cards by Suit in an “ImmutableListMultimap”
• (Group By)
2. Get the number of cards
• Count By Suit returning “Multiset” or “Bag”
• Count By Rank returning “Multiset” or “Bag”
3. Deal five hands of five cards each
• Return the cards as an “ImmutableList” of five Sets of five cards
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Performance Test - Deck of Cards
166,268
179,728
147,495
179,159
165,415
0
20,000
40,000
60,000
80,000
100,000
120,000
140,000
160,000
180,000
200,000
Scoreops/s
Framework
Deck of Cards
Apache EC Guava JDK Vavr
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Performance Notes
• JDK and Apache do not have Immutable
Collections
• Guava’s ImmutableList is backed by an
ImmutableList
• Eclipse Collection’s ImmutableList is backed
by an array
• JavaSlang’s TreeSet is backed by a
RedBlackTree
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class JDK8DeckOfCards {
private List<Card> cards;
private Map<Suit, List<Card>> cardsBySuit;
A Deck of Cards – Only the Types
public class ApacheCommonsDeckOfCards {
private List<Card> cards;
private MultiValuedMap<Suit, Card> cardsBySuit;
public class EclipseCollectionsDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class GoogleGuavaDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class VavrDeckOfCards {
private List<Card> cards;
private Map<Suit, ? extends List<Card>> cardsBySuit;
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class JDK8DeckOfCards {
private List<Card> cards;
private Map<Suit, List<Card>> cardsBySuit;
A Deck of Cards – Only the Types
public class ApacheCommonsDeckOfCards {
private List<Card> cards;
private MultiValuedMap<Suit, Card> cardsBySuit;
public class EclipseCollectionsDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class GoogleGuavaDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class VavrDeckOfCards {
private List<Card> cards;
private Map<Suit, ? extends List<Card>> cardsBySuit;
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class JDK8DeckOfCards {
private List<Card> cards;
private Map<Suit, List<Card>> cardsBySuit;
A Deck of Cards – Only the Types
public class ApacheCommonsDeckOfCards {
private List<Card> cards;
private MultiValuedMap<Suit, Card> cardsBySuit;
public class EclipseCollectionsDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class GoogleGuavaDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class VavrDeckOfCards {
private List<Card> cards;
private Map<Suit, ? extends List<Card>> cardsBySuit;
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class JDK8DeckOfCards {
private List<Card> cards;
private Map<Suit, List<Card>> cardsBySuit;
A Deck of Cards – Only the Types
public class ApacheCommonsDeckOfCards {
private List<Card> cards;
private MultiValuedMap<Suit, Card> cardsBySuit;
public class EclipseCollectionsDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class GoogleGuavaDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class VavrDeckOfCards {
private List<Card> cards;
private Map<Suit, ? extends List<Card>> cardsBySuit;
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class JDK8DeckOfCards {
private List<Card> cards;
private Map<Suit, List<Card>> cardsBySuit;
A Deck of Cards – Only the Types
public class ApacheCommonsDeckOfCards {
private List<Card> cards;
private MultiValuedMap<Suit, Card> cardsBySuit;
public class EclipseCollectionsDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class GoogleGuavaDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class VavrDeckOfCards {
private List<Card> cards;
private Map<Suit, ? extends List<Card>> cardsBySuit;
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class JDK8DeckOfCards {
private List<Card> cards;
private Map<Suit, List<Card>> cardsBySuit;
A Deck of Cards – Only the Types
public class ApacheCommonsDeckOfCards {
private List<Card> cards;
private MultiValuedMap<Suit, Card> cardsBySuit;
public class EclipseCollectionsDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class GoogleGuavaDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class VavrDeckOfCards {
private List<Card> cards;
private Map<Suit, ? extends List<Card>> cardsBySuit;
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Problem Statement – Deck of Cards
1. Create Deck of Cards
• Store Cards in an “ImmutableList”
• (Cartesian product of Suit x Rank)
• Group the cards by Suit in an “ImmutableListMultimap”
• (Group By)
2. Get the number of cards
• Count By Suit returning “Multiset” or “Bag”
• Count By Rank returning “Multiset” or “Bag”
3. Deal five hands of five cards each
• Return the cards as an “ImmutableList” of five Sets of five cards
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Shared Code – Cartesian Product
public static Stream<Card> streamCards() {
return Card.cartesianProduct(
EnumSet.allOf(Rank.class),
EnumSet.allOf(Suit.class),
Card::new);
}
private static <A, B, C> Stream<C> cartesianProduct(
Set<A> set1,
Set<B> set2,
Function2<A, B, C> function) {
return set1.stream().flatMap(first ->
set2.stream().map(second ->
function.apply(first, second)));
}
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Eclipse Collections – Cartesian Product
public static LazyIterable<Card> lazyCards()
{
return Sets.cartesianProduct(
EnumSet.allOf(Rank.class),
EnumSet.allOf(Suit.class),
Card::new);
}
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Performance Benchmarks
• JMH - Java Microbenchmark Harness
• http://openjdk.java.net/projects/code-tools/jmh/
• Measure Reported – Operations per
second
• Bigger numbers are better
• 4 Core Intel i7, 50 Warm-up iterations, 30 measurement
iterations, 3 forks
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Memory Tests
• ObjectSizeCalculator.getObjectSize()
• Internal class in Nashorn
• Java 8
• Smaller numbers are better
• We test the size of the data structures created in each
code example
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Performance Test – ImmutableList
207,258
225,904
187,521 190,509
180,838
0
50,000
100,000
150,000
200,000
250,000
Scoreops/s
Framework
ImmutableList
Apache EC Guava JDK Vavr
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Memory Test – ImmutableList
2888
2776 2776
2896
2824
2700
2720
2740
2760
2780
2800
2820
2840
2860
2880
2900
2920
Framework
Bytes
ImmutableList
Apache EC Guava JDK Vavr
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class JDK8DeckOfCards {
private List<Card> cards;
private Map<Suit, List<Card>> cardsBySuit;
public JDK8DeckOfCards() {
this.cards = Collections.unmodifiableList(
Card.streamCards().sorted().collect(Collectors.toList()));
this.cardsBySuit =
this.cards.stream().collect(Collectors.collectingAndThen(
Collectors.groupingBy(
Card::getSuit,
Collectors.mapping(Function.identity(),
Collectors.collectingAndThen(
Collectors.toList(),
Collections::unmodifiableList))),
Collections::unmodifiableMap));
}
JDK Collections – “ImmutableList”
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
this.cards =
Collections.unmodifiableList(
Card.streamCards()
.sorted()
.collect(Collectors.toList()));
JDK Collections – “ImmutableList”
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class ApacheCommonsDeckOfCards {
private List<Card> cards;
private MultiValuedMap<Suit, Card> cardsBySuit;
public ApacheCommonsDeckOfCards() {
this.cards = ListUtils.unmodifiableList(
Card.streamCards().sorted().collect(Collectors.toList()));
ListValuedMap<Suit, Card> cbs = MultiMapUtils.newListValuedHashMap();
this.cards.forEach(card -> cbs.put(card.getSuit(), card));
this.cardsBySuit = MultiMapUtils.unmodifiableMultiValuedMap(cbs);
}
Apache Collections – “ImmutableList”
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
this.cards =
ListUtils.unmodifiableList(
Card.streamCards()
.sorted()
.collect(Collectors.toList()));
Apache Collections – “ImmutableList”
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class EclipseCollectionsDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public EclipseCollectionsDeckOfCards() {
this.cards = Card.lazyCards().toSortedList().toImmutable();
this.cardsBySuit = this.cards.groupBy(Card::getSuit);
}
Eclipse Collections – ImmutableList
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
this.cards =
Card.lazyCards()
.toSortedList()
.toImmutable();
Eclipse Collections – ImmutableList
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class GoogleGuavaDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public GoogleGuavaDeckOfCards() {
this.cards =
Card.streamCards().sorted().collect(ImmutableList.toImmutableList());
this.cardsBySuit = Multimaps.index(this.cards, Card::getSuit);
}
Google Guava – ImmutableList
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
this.cards =
Card.streamCards()
.sorted()
.collect(ImmutableList.toImmutableList());
Google Guava – ImmutableList
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class VavrDeckOfCards {
private List<Card> cards;
private Map<Suit, ? extends List<Card>> cardsBySuit;
public VavrDeckOfCards() {
this.cards = Card.streamCards().sorted().collect(List.collector());
this.cardsBySuit = this.cards.groupBy(Card::getSuit);
}
Vavr – ImmutableList
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
this.cards =
Card.streamCards()
.sorted()
.collect(List.collector());
Vavr – ImmutableList
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Performance Notes
• Guava’s ImmutableList Collector uses an
ArrayBasedBuilder for adding elements
• The final build step creates the sorts the array and
constructs the ImmutableList
• Eclipse Collections creates a TreeSet from
the array of cards
• The TreeSet is converted to an array via toArray
for final storage
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Problem Statement – Deck of Cards
1. Create Deck of Cards
• Store Cards in an “ImmutableList”
• (Cartesian product of Suit x Rank)
• Group the cards by Suit in an “ImmutableListMultimap”
• (Group By)
2. Get the number of cards
• Count By Suit returning “Multiset” or “Bag”
• Count By Rank returning “Multiset” or “Bag”
3. Deal five hands of five cards each
• Return the cards as an “ImmutableList” of five Sets of five cards
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Performance Test - groupBy
832,841
617,693
459,074
1,123,706
695,402
-
200,000
400,000
600,000
800,000
1,000,000
1,200,000
Scoreops/s
Framework
groupBy
Apache EC Guava JDK Vavr
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Memory Test – groupBy
3336
2952
3136
3336
4208
0
500
1000
1500
2000
2500
3000
3500
4000
4500
Framework
Bytes
groupBy
Apache EC Guava JDK Vavr
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class JDK8DeckOfCards {
private List<Card> cards;
private Map<Suit, List<Card>> cardsBySuit;
public JDK8DeckOfCards() {
this.cards = Collections.unmodifiableList(
Card.streamCards().sorted().collect(Collectors.toList()));
this.cardsBySuit =
this.cards.stream().collect(Collectors.collectingAndThen(
Collectors.groupingBy(
Card::getSuit,
Collectors.mapping(Function.identity(),
Collectors.collectingAndThen(
Collectors.toList(),
Collections::unmodifiableList))),
Collections::unmodifiableMap));
}
JDK Collections – Group By
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
this.cardsBySuit =
this.cards.stream().collect(Collectors.collectingAndThen(
Collectors.groupingBy(
Card::getSuit,
Collectors.mapping(Function.identity(),
Collectors.collectingAndThen(
Collectors.toList(),
Collections::unmodifiableList))),
Collections::unmodifiableMap));
JDK Collections – Group By
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class ApacheCommonsDeckOfCards {
private List<Card> cards;
private MultiValuedMap<Suit, Card> cardsBySuit;
public ApacheCommonsDeckOfCards() {
this.cards = ListUtils.unmodifiableList(
Card.streamCards().sorted().collect(Collectors.toList()));
ListValuedMap<Suit, Card> cbs = MultiMapUtils.newListValuedHashMap();
this.cards.forEach(card -> cbs.put(card.getSuit(), card));
this.cardsBySuit = MultiMapUtils.unmodifiableMultiValuedMap(cbs);
}
Apache Collections – Group By
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
ListValuedMap<Suit, Card> cbs =
MultiMapUtils.newListValuedHashMap();
this.cards.forEach(
card -> cbs.put(card.getSuit(), card));
this.cardsBySuit =
MultiMapUtils.unmodifiableMultiValuedMap(cbs);
Apache Collections – Group By
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class EclipseCollectionsDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public EclipseCollectionsDeckOfCards() {
this.cards = Card.lazyCards().toSortedList().toImmutable();
this.cardsBySuit = this.cards.groupBy(Card::getSuit);
}
Eclipse Collections – Group By
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
this.cardsBySuit =
this.cards.groupBy(Card::getSuit);
Eclipse Collections – Group By
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Google Guava – Group By
public class GoogleGuavaDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public GoogleGuavaDeckOfCards() {
this.cards =
Card.streamCards().sorted().collect(ImmutableList.toImmutableList());
this.cardsBySuit = Multimaps.index(this.cards, Card::getSuit);
}
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
this.cardsBySuit =
Multimaps.index(this.cards, Card::getSuit);
Google Guava – Group By
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Vavr – Group By
public class VavrDeckOfCards {
private List<Card> cards;
private Map<Suit, ? extends List<Card>> cardsBySuit;
public VavrDeckOfCards() {
this.cards = Card.streamCards().sorted().collect(List.collector());
this.cardsBySuit = this.cards.groupBy(Card::getSuit);
}
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
this.cardsBySuit =
this.cards.groupBy(Card::getSuit);
Vavr – Group By
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Performance Test - Deck of Cards
207,258
225,904
187,521 190,509 180,838
ImmutableList
832,841
617,693
459,074
1,123,706
695,402
groupBy
166,268
179,728
147,495
179,159
165,415
Deck of Cards
Apache EC Guava JDK Vavr
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Memory Test – Deck of Cards
3608
3216
3400
3720
5480
0
1000
2000
3000
4000
5000
6000
Framework
Bytes
Deck of Cards
Apache EC Guava JDK Vavr
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Problem Statement – Deck of Cards
1. Create Deck of Cards
• Store Cards in an “ImmutableList”
• (Cartesian product of Suit x Rank)
• Group the cards by Suit in an “ImmutableListMultimap”
• (Group By)
2. Get the number of cards
• Count By Suit returning “Multiset” or “Bag”
• Count By Rank returning “Multiset” or “Bag”
3. Deal five hands of five cards each
• Return the cards as an “ImmutableList” of five Sets of five cards
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Performance Test - countsBySuit
1,302,792
1,797,399
1,488,693
1,553,906
1,432,836
0
200,000
400,000
600,000
800,000
1,000,000
1,200,000
1,400,000
1,600,000
1,800,000
2,000,000
Scoreops/s
Framework
countsBySuit
Apache EC Guava JDK Vavr
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Memory Test - countsBySuit
672
408
704
600 600
0
100
200
300
400
500
600
700
800
Framework
Bytes
countsBySuit
Apache EC Guava JDK Vavr
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Performance Test - countsByRank
889,401
1,339,267
1,136,795
1,289,520
1,208,456
0
200,000
400,000
600,000
800,000
1,000,000
1,200,000
1,400,000
1,600,000
Scoreops/s
Framework
countsByRank
Apache EC Guava JDK Vavr
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Memory Test – countsByRank
1816
1136
1848
1600 1600
0
200
400
600
800
1000
1200
1400
1600
1800
2000
Framework
Bytes
countsByRank
Apache EC Guava JDK Vavr
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public Map<Suit, Long> countsBySuit() {
return this.cards.stream()
.collect(Collectors.groupingBy(
Card::getSuit, Collectors.counting()));
}
public Map<Rank, Long> countsByRank() {
return this.cards.stream()
.collect(Collectors.groupingBy(
Card::getRank, Collectors.counting()));
}
JDK Collections – Count By
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public Bag<Suit> countsBySuit() {
return this.cards.stream()
.map(Card::getSuit)
.collect(Collectors.toCollection(HashBag::new));
}
public MultiSet<Rank> countsByRank() {
return this.cards.stream()
.map(Card::getRank)
.collect(Collectors.toCollection(HashMultiSet::new));
}
Apache Collections – Count By
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public Bag<Suit> countsBySuit() {
return this.cards.countBy(Card::getSuit);
}
public Bag<Rank> countsByRank() {
return this.cards.countBy(Card::getRank);
}
Eclipse Collections – Count By
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public Multiset<Suit> countsBySuit() {
return this.cards.stream()
.collect(Multisets.toMultiset(
Card::getSuit, e -> 1, HashMultiset::create));
}
public Multiset<Rank> countsByRank() {
return this.cards.stream()
.collect(Multisets.toMultiset(
Card::getRank, e -> 1, HashMultiset::create));
}
Google Guava – Count By
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public java.util.Map<Suit, Long> countsBySuit() {
return this.cards.collect(
Collectors.groupingBy(
Card::getSuit,
Collectors.counting()));
}
public java.util.Map<Rank, Long> countsByRank() {
return this.cards.collect(
Collectors.groupingBy(
Card::getRank,
Collectors.counting()));
}
Vavr – Count By
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Problem Statement – Deck of Cards
1. Create Deck of Cards
• Store Cards in an “ImmutableList”
• (Cartesian product of Suit x Rank)
• Group the cards by Suit in an “ImmutableListMultimap”
• (Group By)
2. Get the number of cards
• Count By Suit returning “Multiset” or “Bag”
• Count By Rank returning “Multiset” or “Bag”
3. Deal five hands of five cards each
• Return the cards as an “ImmutableList” of five Sets of five cards
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Performance Test – Deal Hands
935,213
1,320,811
935,860 945,125
716,883
0
200,000
400,000
600,000
800,000
1,000,000
1,200,000
1,400,000
Scoreops/s
Framework
Deal
Apache EC Guava JDK Vavr
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Memory Test – Deal Hands
3528
2440
3488 3536
3120
0
500
1000
1500
2000
2500
3000
3500
4000
Framework
Bytes
Deal
Apache EC Guava JDK Vavr
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
JDK Collections – Deal Hands
public List<Set<Card>> dealHands(
Deque<Card> shuffled,
int hands,
int cardsPerHand)
{
return Collections.unmodifiableList(
IntStream.range(0, hands)
.mapToObj(i -> this.deal(shuffled, cardsPerHand))
.collect(Collectors.toList()));
}
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Apache Collections – Deal Hands
public List<Set<Card>> dealHands(
Deque<Card> shuffled,
int hands,
int cardsPerHand)
{
return ListUtils.unmodifiableList(
IntStream.range(0, hands)
.mapToObj(i -> this.deal(shuffled, cardsPerHand))
.collect(Collectors.toList()));
}
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Eclipse Collections – Deal Hands
public ImmutableList<Set<Card>> dealHands(
MutableStack<Card> shuffled,
int hands,
int cardsPerHand)
{
return IntInterval.oneTo(hands)
.collect(i -> this.deal(shuffled, cardsPerHand));
}
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Google Guava – Deal Hands
public ImmutableList<Set<Card>> dealHands(
Deque<Card> shuffled,
int hands,
int cardsPerHand)
{
return IntStream.range(0, hands)
.mapToObj(i -> this.deal(shuffled, cardsPerHand))
.collect(ImmutableList.toImmutableList());
}
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Vavr – Deal Hands
public List<Set<Card>> dealHands(
Stack<Card> shuffled,
int hands,
int cardsPerHand) {
List<Set<Card>> list = List.empty();
for (int i = 0; i < hands; i++) {
Tuple2<Set<Card>, ? extends Stack<Card>> tuple2 =
this.deal(shuffled, cardsPerHand);
shuffled = tuple2._2();
list = list.append(tuple2._1());
}
return list;
}
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Feature JDK Apache Guava Eclipse Vavr 1st, 2nd, 3rd
List, Set, Map ✔ þ ✖ ✔ þ JDK, EC, JS
Multiset / Bag ✖ ✔ ✔ ✔ ✖ GG, EC, AC
Multimap ✖ ✔ ✔ ✔ ✔ GG, EC, AC
BiMap ✖ ✔ ✔ ✔ ✖ GG, EC, AC
Stack ✔ þ ✖ ✔ ✔ EC, JDK, JS
Tree / Trie ✖ ✔ ✖ ✖ ✔ JS, AC
Table ✖ ✖ ✔ ✖ ✖ GG
Additional Types ✔ ✔ ✔ ý ý AC, JDK, GG
Immutable? ✖ ✖ ✔ ✔ ✔ JS, EC, GG
Primitives? ý ✖ ý ✔ ✖ EC, JDK, GG
Fluent API þ ý ý ✔ ✔ EC, JS, JDK
(E), (L), (S), (P)* ý, ✔, ✔, ✔ þ, þ, ✔, ✖ ✖, þ, ✔, ✖ ✔, ✔, ✔, ✔ ✔, ✔, ✔, ✖ EC, JDK, JS
Collection Framework Comparison
*(E)ager, (L)azy, (S)erial, (P)arallel – Functional API
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Links
— The Collections Compare Project
— https://github.com/nikhilnanivadekar/Coll
ectionsCompare
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
? & !
Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Thanks!

More Related Content

What's hot

Java to Scala: Why & How
Java to Scala: Why & HowJava to Scala: Why & How
Java to Scala: Why & How
Graham Tackley
 
Scala Days NYC 2016
Scala Days NYC 2016Scala Days NYC 2016
Scala Days NYC 2016
Martin Odersky
 
Andrea Lattuada, Gabriele Petronella - Building startups on Scala
Andrea Lattuada, Gabriele Petronella - Building startups on ScalaAndrea Lattuada, Gabriele Petronella - Building startups on Scala
Andrea Lattuada, Gabriele Petronella - Building startups on Scala
Scala Italy
 
Scala profiling
Scala profilingScala profiling
Scala profiling
Filippo Pacifici
 
Scala's evolving ecosystem- Introduction to Scala.js
Scala's evolving ecosystem- Introduction to Scala.jsScala's evolving ecosystem- Introduction to Scala.js
Scala's evolving ecosystem- Introduction to Scala.js
Knoldus Inc.
 
Scarab: SAT-based Constraint Programming System in Scala / Scala上で実現された制約プログラ...
Scarab: SAT-based Constraint Programming System in Scala / Scala上で実現された制約プログラ...Scarab: SAT-based Constraint Programming System in Scala / Scala上で実現された制約プログラ...
Scarab: SAT-based Constraint Programming System in Scala / Scala上で実現された制約プログラ...
scalaconfjp
 
How Scala code is expressed in the JVM
How Scala code is expressed in the JVMHow Scala code is expressed in the JVM
How Scala code is expressed in the JVM
Koichi Sakata
 
Akka Actor presentation
Akka Actor presentationAkka Actor presentation
Akka Actor presentation
Gene Chang
 
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
scalaconfjp
 
Java 201 Intro to Test Driven Development in Java
Java 201   Intro to Test Driven Development in JavaJava 201   Intro to Test Driven Development in Java
Java 201 Intro to Test Driven Development in Java
agorolabs
 
How You Convince Your Manager To Adopt Scala.js in Production
How You Convince Your Manager To Adopt Scala.js in ProductionHow You Convince Your Manager To Adopt Scala.js in Production
How You Convince Your Manager To Adopt Scala.js in Production
BoldRadius Solutions
 
Introduction to Spark SQL and Catalyst / Spark SQLおよびCalalystの紹介
Introduction to Spark SQL and Catalyst / Spark SQLおよびCalalystの紹介Introduction to Spark SQL and Catalyst / Spark SQLおよびCalalystの紹介
Introduction to Spark SQL and Catalyst / Spark SQLおよびCalalystの紹介
scalaconfjp
 
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKit
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKitAtlasCamp 2012 - Testing JIRA plugins smarter with TestKit
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKit
Wojciech Seliga
 
Scala in practice
Scala in practiceScala in practice
Scala in practice
Tomer Gabel
 
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディングXitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
scalaconfjp
 
Composable Futures with Akka 2.0
Composable Futures with Akka 2.0Composable Futures with Akka 2.0
Composable Futures with Akka 2.0
Mike Slinn
 
Java 101 Intro to Java Programming - Exercises
Java 101   Intro to Java Programming - ExercisesJava 101   Intro to Java Programming - Exercises
Java 101 Intro to Java Programming - Exercises
agorolabs
 
Weaving Dataflows with Silk - ScalaMatsuri 2014, Tokyo
Weaving Dataflows with Silk - ScalaMatsuri 2014, TokyoWeaving Dataflows with Silk - ScalaMatsuri 2014, Tokyo
Weaving Dataflows with Silk - ScalaMatsuri 2014, Tokyo
Taro L. Saito
 
SQL Provider
SQL ProviderSQL Provider
SQL Provider
Ross McKinlay
 
Hibernate in XPages
Hibernate in XPagesHibernate in XPages
Hibernate in XPages
Toby Samples
 

What's hot (20)

Java to Scala: Why & How
Java to Scala: Why & HowJava to Scala: Why & How
Java to Scala: Why & How
 
Scala Days NYC 2016
Scala Days NYC 2016Scala Days NYC 2016
Scala Days NYC 2016
 
Andrea Lattuada, Gabriele Petronella - Building startups on Scala
Andrea Lattuada, Gabriele Petronella - Building startups on ScalaAndrea Lattuada, Gabriele Petronella - Building startups on Scala
Andrea Lattuada, Gabriele Petronella - Building startups on Scala
 
Scala profiling
Scala profilingScala profiling
Scala profiling
 
Scala's evolving ecosystem- Introduction to Scala.js
Scala's evolving ecosystem- Introduction to Scala.jsScala's evolving ecosystem- Introduction to Scala.js
Scala's evolving ecosystem- Introduction to Scala.js
 
Scarab: SAT-based Constraint Programming System in Scala / Scala上で実現された制約プログラ...
Scarab: SAT-based Constraint Programming System in Scala / Scala上で実現された制約プログラ...Scarab: SAT-based Constraint Programming System in Scala / Scala上で実現された制約プログラ...
Scarab: SAT-based Constraint Programming System in Scala / Scala上で実現された制約プログラ...
 
How Scala code is expressed in the JVM
How Scala code is expressed in the JVMHow Scala code is expressed in the JVM
How Scala code is expressed in the JVM
 
Akka Actor presentation
Akka Actor presentationAkka Actor presentation
Akka Actor presentation
 
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
 
Java 201 Intro to Test Driven Development in Java
Java 201   Intro to Test Driven Development in JavaJava 201   Intro to Test Driven Development in Java
Java 201 Intro to Test Driven Development in Java
 
How You Convince Your Manager To Adopt Scala.js in Production
How You Convince Your Manager To Adopt Scala.js in ProductionHow You Convince Your Manager To Adopt Scala.js in Production
How You Convince Your Manager To Adopt Scala.js in Production
 
Introduction to Spark SQL and Catalyst / Spark SQLおよびCalalystの紹介
Introduction to Spark SQL and Catalyst / Spark SQLおよびCalalystの紹介Introduction to Spark SQL and Catalyst / Spark SQLおよびCalalystの紹介
Introduction to Spark SQL and Catalyst / Spark SQLおよびCalalystの紹介
 
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKit
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKitAtlasCamp 2012 - Testing JIRA plugins smarter with TestKit
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKit
 
Scala in practice
Scala in practiceScala in practice
Scala in practice
 
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディングXitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
 
Composable Futures with Akka 2.0
Composable Futures with Akka 2.0Composable Futures with Akka 2.0
Composable Futures with Akka 2.0
 
Java 101 Intro to Java Programming - Exercises
Java 101   Intro to Java Programming - ExercisesJava 101   Intro to Java Programming - Exercises
Java 101 Intro to Java Programming - Exercises
 
Weaving Dataflows with Silk - ScalaMatsuri 2014, Tokyo
Weaving Dataflows with Silk - ScalaMatsuri 2014, TokyoWeaving Dataflows with Silk - ScalaMatsuri 2014, Tokyo
Weaving Dataflows with Silk - ScalaMatsuri 2014, Tokyo
 
SQL Provider
SQL ProviderSQL Provider
SQL Provider
 
Hibernate in XPages
Hibernate in XPagesHibernate in XPages
Hibernate in XPages
 

Similar to JavaOne 2017 - Collections.compare:JDK, Eclipse, Guava, Apache... [CON1754]

Introducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGNIntroducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGN
Manish Pandit
 
Scala Introduction
Scala IntroductionScala Introduction
Scala Introduction
Adrian Spender
 
Building Concurrent WebObjects applications with Scala
Building Concurrent WebObjects applications with ScalaBuilding Concurrent WebObjects applications with Scala
Building Concurrent WebObjects applications with Scala
WO Community
 
Collections.compare(JDK, Eclipse, Guava, Apache...); DevoxxUS 2017
Collections.compare(JDK, Eclipse, Guava, Apache...); DevoxxUS 2017Collections.compare(JDK, Eclipse, Guava, Apache...); DevoxxUS 2017
Collections.compare(JDK, Eclipse, Guava, Apache...); DevoxxUS 2017
Nikhil Nanivadekar
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
Mohammad Hossein Rimaz
 
Java 8 Lambda
Java 8 LambdaJava 8 Lambda
Java 8 Lambda
François Sarradin
 
Migrating Beyond Java 8
Migrating Beyond Java 8Migrating Beyond Java 8
Migrating Beyond Java 8
DaliaAboSheasha
 
1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptx1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptx
BhargaviDalal3
 
Java 8 features
Java 8 featuresJava 8 features
Java 8 features
Oleg Tsal-Tsalko
 
Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)
Ryan Cuprak
 
Trends and future of java
Trends and future of javaTrends and future of java
Trends and future of java
Csaba Toth
 
Sadiq786
Sadiq786Sadiq786
Sadiq786
sadiqkhan786
 
Martin Odersky: What's next for Scala
Martin Odersky: What's next for ScalaMartin Odersky: What's next for Scala
Martin Odersky: What's next for Scala
Marakana Inc.
 
Scala and jvm_languages_praveen_technologist
Scala and jvm_languages_praveen_technologistScala and jvm_languages_praveen_technologist
Scala and jvm_languages_praveen_technologist
pmanvi
 
Spark - The Ultimate Scala Collections by Martin Odersky
Spark - The Ultimate Scala Collections by Martin OderskySpark - The Ultimate Scala Collections by Martin Odersky
Spark - The Ultimate Scala Collections by Martin Odersky
Spark Summit
 
Making The Move To Java 17 (JConf 2022)
Making The Move To Java 17 (JConf 2022)Making The Move To Java 17 (JConf 2022)
Making The Move To Java 17 (JConf 2022)
Alex Motley
 
DevNexus 2020: Discover Modern Java
DevNexus 2020: Discover Modern JavaDevNexus 2020: Discover Modern Java
DevNexus 2020: Discover Modern Java
Henri Tremblay
 
JCConf 2018 - Retrospect and Prospect of Java
JCConf 2018 - Retrospect and Prospect of JavaJCConf 2018 - Retrospect and Prospect of Java
JCConf 2018 - Retrospect and Prospect of Java
Joseph Kuo
 
Expanding beyond SPL -- More language support in IBM Streams V4.1
Expanding beyond SPL -- More language support in IBM Streams V4.1Expanding beyond SPL -- More language support in IBM Streams V4.1
Expanding beyond SPL -- More language support in IBM Streams V4.1
lisanl
 
Eclipse MicroProfile 과 Microservice Java framework – Helidon
Eclipse MicroProfile 과 Microservice Java framework – HelidonEclipse MicroProfile 과 Microservice Java framework – Helidon
Eclipse MicroProfile 과 Microservice Java framework – Helidon
Oracle Korea
 

Similar to JavaOne 2017 - Collections.compare:JDK, Eclipse, Guava, Apache... [CON1754] (20)

Introducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGNIntroducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGN
 
Scala Introduction
Scala IntroductionScala Introduction
Scala Introduction
 
Building Concurrent WebObjects applications with Scala
Building Concurrent WebObjects applications with ScalaBuilding Concurrent WebObjects applications with Scala
Building Concurrent WebObjects applications with Scala
 
Collections.compare(JDK, Eclipse, Guava, Apache...); DevoxxUS 2017
Collections.compare(JDK, Eclipse, Guava, Apache...); DevoxxUS 2017Collections.compare(JDK, Eclipse, Guava, Apache...); DevoxxUS 2017
Collections.compare(JDK, Eclipse, Guava, Apache...); DevoxxUS 2017
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
Java 8 Lambda
Java 8 LambdaJava 8 Lambda
Java 8 Lambda
 
Migrating Beyond Java 8
Migrating Beyond Java 8Migrating Beyond Java 8
Migrating Beyond Java 8
 
1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptx1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptx
 
Java 8 features
Java 8 featuresJava 8 features
Java 8 features
 
Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)
 
Trends and future of java
Trends and future of javaTrends and future of java
Trends and future of java
 
Sadiq786
Sadiq786Sadiq786
Sadiq786
 
Martin Odersky: What's next for Scala
Martin Odersky: What's next for ScalaMartin Odersky: What's next for Scala
Martin Odersky: What's next for Scala
 
Scala and jvm_languages_praveen_technologist
Scala and jvm_languages_praveen_technologistScala and jvm_languages_praveen_technologist
Scala and jvm_languages_praveen_technologist
 
Spark - The Ultimate Scala Collections by Martin Odersky
Spark - The Ultimate Scala Collections by Martin OderskySpark - The Ultimate Scala Collections by Martin Odersky
Spark - The Ultimate Scala Collections by Martin Odersky
 
Making The Move To Java 17 (JConf 2022)
Making The Move To Java 17 (JConf 2022)Making The Move To Java 17 (JConf 2022)
Making The Move To Java 17 (JConf 2022)
 
DevNexus 2020: Discover Modern Java
DevNexus 2020: Discover Modern JavaDevNexus 2020: Discover Modern Java
DevNexus 2020: Discover Modern Java
 
JCConf 2018 - Retrospect and Prospect of Java
JCConf 2018 - Retrospect and Prospect of JavaJCConf 2018 - Retrospect and Prospect of Java
JCConf 2018 - Retrospect and Prospect of Java
 
Expanding beyond SPL -- More language support in IBM Streams V4.1
Expanding beyond SPL -- More language support in IBM Streams V4.1Expanding beyond SPL -- More language support in IBM Streams V4.1
Expanding beyond SPL -- More language support in IBM Streams V4.1
 
Eclipse MicroProfile 과 Microservice Java framework – Helidon
Eclipse MicroProfile 과 Microservice Java framework – HelidonEclipse MicroProfile 과 Microservice Java framework – Helidon
Eclipse MicroProfile 과 Microservice Java framework – Helidon
 

More from Leonardo De Moura Rocha Lima

Top 9 mistakes to avoid when developing with NoSQL
Top 9 mistakes to avoid when developing with NoSQLTop 9 mistakes to avoid when developing with NoSQL
Top 9 mistakes to avoid when developing with NoSQL
Leonardo De Moura Rocha Lima
 
Java & IoT
Java & IoTJava & IoT
JSR363 - Devoxx US
JSR363 - Devoxx USJSR363 - Devoxx US
JSR363 - Devoxx US
Leonardo De Moura Rocha Lima
 
IoT Security: Cases and Methods
IoT Security: Cases and MethodsIoT Security: Cases and Methods
IoT Security: Cases and Methods
Leonardo De Moura Rocha Lima
 
The First IoT JSR: Units of Measurement JSR-363 [BOF5981]
The First IoT JSR: Units of Measurement JSR-363 [BOF5981]The First IoT JSR: Units of Measurement JSR-363 [BOF5981]
The First IoT JSR: Units of Measurement JSR-363 [BOF5981]
Leonardo De Moura Rocha Lima
 
Using Java and Standards for Fast IoT Development [CON5513]
Using Java and Standards for Fast IoT Development [CON5513]Using Java and Standards for Fast IoT Development [CON5513]
Using Java and Standards for Fast IoT Development [CON5513]
Leonardo De Moura Rocha Lima
 
IoT Security: Cases and Methods [CON5446]
IoT Security: Cases and Methods [CON5446]IoT Security: Cases and Methods [CON5446]
IoT Security: Cases and Methods [CON5446]
Leonardo De Moura Rocha Lima
 
Secure IoT with Blockchain: Fad or Reality? [BOF5490]
Secure IoT with Blockchain: Fad or Reality? [BOF5490]Secure IoT with Blockchain: Fad or Reality? [BOF5490]
Secure IoT with Blockchain: Fad or Reality? [BOF5490]
Leonardo De Moura Rocha Lima
 
Building a Reliable Remote Communication Device with Java ME8 [CON2285]
Building a Reliable Remote Communication Device with Java ME8 [CON2285]Building a Reliable Remote Communication Device with Java ME8 [CON2285]
Building a Reliable Remote Communication Device with Java ME8 [CON2285]
Leonardo De Moura Rocha Lima
 
A internet das coisas e o futuro - Java ME 8 e adiante!
A internet das coisas e o futuro - Java ME 8 e adiante!A internet das coisas e o futuro - Java ME 8 e adiante!
A internet das coisas e o futuro - Java ME 8 e adiante!
Leonardo De Moura Rocha Lima
 

More from Leonardo De Moura Rocha Lima (10)

Top 9 mistakes to avoid when developing with NoSQL
Top 9 mistakes to avoid when developing with NoSQLTop 9 mistakes to avoid when developing with NoSQL
Top 9 mistakes to avoid when developing with NoSQL
 
Java & IoT
Java & IoTJava & IoT
Java & IoT
 
JSR363 - Devoxx US
JSR363 - Devoxx USJSR363 - Devoxx US
JSR363 - Devoxx US
 
IoT Security: Cases and Methods
IoT Security: Cases and MethodsIoT Security: Cases and Methods
IoT Security: Cases and Methods
 
The First IoT JSR: Units of Measurement JSR-363 [BOF5981]
The First IoT JSR: Units of Measurement JSR-363 [BOF5981]The First IoT JSR: Units of Measurement JSR-363 [BOF5981]
The First IoT JSR: Units of Measurement JSR-363 [BOF5981]
 
Using Java and Standards for Fast IoT Development [CON5513]
Using Java and Standards for Fast IoT Development [CON5513]Using Java and Standards for Fast IoT Development [CON5513]
Using Java and Standards for Fast IoT Development [CON5513]
 
IoT Security: Cases and Methods [CON5446]
IoT Security: Cases and Methods [CON5446]IoT Security: Cases and Methods [CON5446]
IoT Security: Cases and Methods [CON5446]
 
Secure IoT with Blockchain: Fad or Reality? [BOF5490]
Secure IoT with Blockchain: Fad or Reality? [BOF5490]Secure IoT with Blockchain: Fad or Reality? [BOF5490]
Secure IoT with Blockchain: Fad or Reality? [BOF5490]
 
Building a Reliable Remote Communication Device with Java ME8 [CON2285]
Building a Reliable Remote Communication Device with Java ME8 [CON2285]Building a Reliable Remote Communication Device with Java ME8 [CON2285]
Building a Reliable Remote Communication Device with Java ME8 [CON2285]
 
A internet das coisas e o futuro - Java ME 8 e adiante!
A internet das coisas e o futuro - Java ME 8 e adiante!A internet das coisas e o futuro - Java ME 8 e adiante!
A internet das coisas e o futuro - Java ME 8 e adiante!
 

Recently uploaded

Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
Claudio Di Ciccio
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
Techgropse Pvt.Ltd.
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 

Recently uploaded (20)

Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 

JavaOne 2017 - Collections.compare:JDK, Eclipse, Guava, Apache... [CON1754]