Overview
Syllabus
Intro
Choosing the best implementation for your use case
Choosing the most common operations for benchmark
Can you apply the On complexity to your use case?
Using JMH to run your benchmarks
Reading elements from the beginning and the end of a list
Reading elements from the middle of a list
Introducing pointer chasing
Benching the impact of pointer chasing on LinkedList
Iterating over a list with an index or an Iterator
Creating an array-based list to speed up your iterations
Wrapping up pointer chasing
ArrayList caveats: insertion, deletion, and resizing
Benching insertion and resizing for ArrayList
Comparing inserting and adding for ArrayList and LinkedList
Comparing the memory consumption of ArrayList and LinkedList
Reducing your memory footprint by using trimToSize
Wrapping up performances and memory consumption
Outro
Taught by
Java