3 ms·
> (e.g. looping through an array every time you want an item with id=x instead of just using a hashtable) Huh, I had almost the exact same experience with seni
by Izkata 7y ago
> (e.g. looping through an array every time you want an item with id=x instead of just using a hashtable)
Huh, I had almost the exact same experience with senior devs here - they were checking if elements were in a (huge) list in nested loops, instead of using a set. Switching brought the runtime from around 2 hours to 2 minutes.