Why can't I set the initial capacity for a ConcurrentSkipListMap?
data-structures, java
Solution
Because this data structure is backed by multiple LinkedList for whom an initial capacity constructor parameter has no meaning.
The HashMap is backed by an array (contiguous memory space) for which it makes sense to set an initial capacity because going over the initial size of this table cause the HashMap to reallocate a new table with an increased size which is very costly.
Problem
Why doesn't the ConcurrentSkipListMap constructors allow us to set the `initial capacity` like HashMap does ?