✅ which is better ?

So I have class Room and I’m trying to do some optomization

I created a List of room and then created a function that makes a loop in the list and return the room if it matches the id.

Now thinking about it i can also make a Dictionary<int, room> and access room with the id which one is better ?
Was this page helpful?