3 ms·
The C world has various reusable linked lists, but yes, there is occasionally a reason to implement one yourself: a {data, next} tuple usually fits in a single
by JoachimSchipper 16y ago
The C world has various reusable linked lists, but yes, there is occasionally a reason to implement one yourself: a {data, next} tuple usually fits in a single cache line, whereas some libraries only offer {data pointer, next} tuples, which requires loading in the memory that <data pointer> points to. The performance difference can matter.
That said, some more agreement on reusable code may be useful, especially for things that aren't as easy to implement as linked lists.