On 28 June 2013 09:18,  <m...@freebsd.org> wrote:

>> You can't make that assumption. I bet that if both pointers are in the
>> _same_ cache line, the overhead of maintaining a double linked list is
>> trivial.
>
>
> No, it's not.  A singly-linked SLIST only needs to modify the head of the
> list and the current element.  A doubly-linked LIST needs to modify both the
> head as well as the old first element, which may not be in cache (and may
> not be in the same TLB, either).  I don't recall exactly what [S]TAILQ
> touches, but the doubly-linked version still has to modify more entries that
> are not contiguous.

Good point.



-adrian
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to