News for hackers. Stuff that matters.
Re:I had to give a wrong answer to get the job (2017) by dcow on Monday July 19, 2021 @05:50PM (#27887648)
I’m not sure what I am wrong about, I’m simply pointing out that worse average case performance is sometimes desirable over better average case worse worst case performance. Context is everything.

Also some things to note: a) game logic tends not to parallelize very well for various reasons, but even so it depends on the domain of the problem whether or not you can run a parallel algorithm on a linked list, b) if you already have a reference to the insertion point you can avoid the walk, c) cache coherence is only important of you are actually iterating over the list, etc.

Re:I had to give a wrong answer to get the job (2017) by whatshisface on Monday July 19, 2021 @09:49PM (#27889309)
I have never ever seen a linked list in a game, anywhere, serving any purpose.
Re:I had to give a wrong answer to get the job (2017) by areyousure on Tuesday July 20, 2021 @12:52PM (#27896146)
Look at all the instances of "next" in this file: https://github.com/id-Software/Quake-III-Arena/blob/dbe4ddb1...
Re:I had to give a wrong answer to get the job (2017) by lmilcin on Wednesday July 21, 2021 @03:18AM (#27903297)
He is still probably technically right.

"I have never seen (...)"

Re:I had to give a wrong answer to get the job (2017) by dcow on Wednesday July 21, 2021 @09:57AM (#27906337)
Nobody responding asserted anything to the contrary. Rather, examples were provided rhetorically and for anybody interested in exploring more.
Re:I had to give a wrong answer to get the job (2017) by dcow on Tuesday July 20, 2021 @12:21AM (#27890033)