Iterating over a dictionary without GC allocation

What’s the go to method around here if you want to have a collection with a key but also need to frequently iterate over it? Double book the contents in a List and a Dictionary? Abuse Contains and IndexOf on a List? Does this change with larger collections? (10k to 40k)

I ‘double booked’ it.

using the list when I wanted to iterate, dictionary for direct access