2 ms·
The game studio I did did many many things in linked lists or arrays still because literally searching an array is still much much faster than computing out has
by grogenaut 3y ago
The game studio I did did many many things in linked lists or arrays still because literally searching an array is still much much faster than computing out hash algorithm when the total number of entries is less than a thousand and it gives you memory predictability. So generally when you're searching it almost all of it has been loaded into RAM especially if you limit the size of the items in the length list which games almost always do and you list limit the size of the array which games almost always do almost everything in a good game engine is fixed size arrays for repeatable performance. I was surprised by this as well when I moved from doing Ruby and Java apps into AAA game studio but the engineers were kind and explained it to me and showed me the math and I was like yep that is way faster. I also didn't appreciate the things like cash coherence that they highly leveraged to make every frame sing