groostav
07/06/2020, 10:59 PMLinkedHashMap
is a nice type in that its got the time complexities of a hash map and it preserves insertion order... but its implementation really is pretty gnarly. Does anybody have numbers on how its implementation impacts performance? Is there a more performant (and/or simpler and/or compact) implementation of an insertion-order-preserving-Map if I'm willing to give up some of the more esoteric intricacies of LinkedHashMap
(eg: degradation to a b-tree if hashCode == 0
, dynamic-checking for Comparable
implementations, etc)? Immutability (even via copy-on-write) is also fine. I have maps that have an upper-bound size of 200, and I'm looking to get to lookups on the order of millions per second.Jakub Pi
07/07/2020, 3:32 AMelizarov
07/07/2020, 6:57 AMMatteo Mirk
07/07/2020, 1:05 PM