Android have their own implementation of HashMap, which doesnt use Autoboxing and it is somehow better for performance (CPU or RAM)?
https://developer.android.com/reference/android/support/v4/util/ArrayMap.html
From what I read here, I should replace my HashMap objects with ArrayMap objects if I have HashMaps whose size is below hundreds of records and will be frequently written to. And there is no point in replacing my HashMaps with ArrayMaps if they are going to contain hundreds of objects and will be written to once and read frequently. Am I Correct?
You should take a look at this video : https://www.youtube.com/watch?v=ORgucLTtTDI
Perfect situations:
1. small number of items (< 1000) with a lots of accesses or the insertions and deletions are infrequent enough that the overhead of doing so is not really noticed.
2. containers of maps - maps of maps where the submaps tends to have low number of items and often iterate over then a lot of time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With