Hacker News new | ask | show | jobs
by jacobgorm 635 days ago
Who in their right mind uses linked lists for a database style workload? Try doing this with arrays to get a reasonable baseline.
1 comments

Who in their right mind would use linked lists in linux kernel... hehe
That is not a database style workload like the one in the example with millions of elements that all had to be scanned.
A server with 100K TCP connections isn't much different, and you might be surprised (or maybe not) by how extensively dynamic data structures are used in the TCP stack implementation. I'm not sure all of them can be made 'cache-friendly,' and embedding all layers together would make the code unmaintainable. Intensive access to external memory is inevitable when accessing a large enough number of unrelated states.