News for hackers. Stuff that matters.
Re:I had to give a wrong answer to get the job (2017) by typon on Monday July 19, 2021 @01:19PM (#27885046)
Any game engine design worth its salt would:

1. Probably not used linked lists (contiguous layout means better cache efficiency)

2. Would try to understand their data requirements and allocate memory up front as much as possible - doing a similar amortized analysis the OP is suggesting rather than a generic "always have O(1) insertion" at the cost of using an inferior data structure (a linked list)

Re:I had to give a wrong answer to get the job (2017) by BrS96bVxXBLzf5B on Monday July 19, 2021 @03:18PM (#27886286)
Any game engine architect worth her salt would know to not speak so absolutely about cache coherency, and that if you're dealing with a use-case where iteration is massively infrequent but random insertions and removals are likely, you could be better off with the linked list :)
Re:I had to give a wrong answer to get the job (2017) by typon on Monday July 19, 2021 @05:43PM (#27887595)
Certainly if you design a scenario where linked lists are superior to use, you should use linked lists. Fortunately, these are few and far between in real production software.