4 ms·
In game dev, that one copy might cause a frame drop. Even if amortized over time the frame rate would be slightly higher, the occasional dip might make it unpla
by winrid 5y ago
In game dev, that one copy might cause a frame drop. Even if amortized over time the frame rate would be slightly higher, the occasional dip might make it unplayable.
Of course, arrays have better cache locality, but they didn't ask about that.
They were probably looking for a linked list with a small array in each node, which gives more constant write performance and less cache misses on read.
- munificent 5y agoThey didn't ask about latency either. I would have been happy to have the discussion of real-world performance, but we were stuck on the basic "what is the algorithmic complexity of this?" question.
- chakkepolja 5y agoIf they had the clue what they were asking about, wouldn't they have corrected GP? "No dude we can't have that worst case here in game dev!!". But they asked about algo complexity and couldn't recognize GP was talking about amortized complexity, something sounds wrong.