News for hackers. Stuff that matters.
Re:New Grad vs. Senior Dev by onekorg on Saturday March 28, 2020 @02:25PM (#22713159)
The answer could be 2x. Let's say you're in a 64 bit platform. Your linked list nodes consist of a next pointer and a 64 bit integer.

If your linked list nodes are all allocated sequentially in memory then it'd only be 2x as slow as an array of 64 bit integers.

But maybe it's not fair to call sequentially allocated linked list a "trivial linked list".

Re:New Grad vs. Senior Dev by koala_man on Saturday March 28, 2020 @04:20PM (#22714037)
This kind of CS-based rationalization is arguably another aspect of what the article comments on. I wrote a benchmark and found the difference in this case to be 3x-3.5x.