pablisco
04/26/2020, 5:41 PMMap
in Kotlin. What do y’all do?
https://twitter.com/pablisc0/status/1254465101224120324Dominaezzz
04/26/2020, 5:55 PMmapOf(....)
?pablisco
04/26/2020, 6:01 PMHashMap()
constructor and I'm curious to see how common it is :)
The tweet has polling options btwRobert Jaros
04/26/2020, 6:05 PMZach Klippenstein (he/him) [MOD]
04/26/2020, 8:29 PMLinkedHashMap
which preserves iteration order, which makes your code more deterministic. HashMap
does not preserve order.pablisco
04/26/2020, 9:48 PMZach Klippenstein (he/him) [MOD]
04/26/2020, 11:21 PMDico
04/27/2020, 7:50 AMDico
04/27/2020, 7:55 AMDico
04/27/2020, 7:55 AMpablisco
04/27/2020, 8:40 AMgildor
04/29/2020, 12:18 PMDico
04/29/2020, 12:24 PMDico
04/29/2020, 12:24 PMpablisco
04/29/2020, 1:57 PMAfter this whole analysis about ArrayList and LinkedList, we can conclude that we should choose a list based on which use cases we are going to need.
pablisco
04/29/2020, 2:06 PMpablisco
04/29/2020, 2:12 PMgildor
04/29/2020, 11:50 PMgildor
04/29/2020, 11:54 PMif you are going to mutate the list, use LinkedListNot really, only if you have huge lists with thousands elements. Because memory
if you are gonna just read sequentially it doesn't matter much as they have pretty close in performance, specially with small listsIt does matter, because LinkedList also has much higher memory usage
gildor
04/29/2020, 11:56 PM