2 ms·
I'm not sure I like this implementation a lot. For instance if I've some kind of struct inside my application that is allocated a lot of times and is rarely put
by antirez 17y ago
I'm not sure I like this implementation a lot. For instance if I've some kind of struct inside my application that is allocated a lot of times and is rarely put into a linked list I don't want to have the two pointers overhead in all the instances of this structure.
On the other side it's a win about cache locality, and even mmeory-wise when the object happens to be linked to a linked list most of the times (you win a pointer, 8 bytes in a 64 bit arch).