It is not uncommon to have a bigger set of elements we need to access many times. It might be:

  • A cache — data that we download from some service and then keep in local memory to access them more quickly
  • A repository with data loaded from some file
  • An in-memory repository used for different kinds of tests

Those data might represent some list of users, ids, configurations, etc. They are generally given to us as a list, and it is tempting to represent them in our memory the same way.

#lists #kotlin #maps

How to the other repositories can be implemented to improve element access performance.
1.10 GEEK