Array vs. Linked List Traversal

Liste des GroupesRevenir à c arch 
Sujet : Array vs. Linked List Traversal
De : jseigh_es00 (at) *nospam* xemaps.com (jseigh)
Groupes : comp.arch
Date : 01. Aug 2024, 15:55:57
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v8g7lr$27dq5$1@dont-email.me>
User-Agent : Mozilla Thunderbird
It's claimed that array traversal is faster than linked list traversal.  What would be the reasons for that?
Array elements being in cache, assuming the element size is small enough to fit multiple elements in a cache line?
No dependent load delay from having to load the linked list next pointer?  If that was the case, then moving the load of the next pointer to the beginning of the loop should ameliorate that somewhat.
Something else?
Joe Seigh

Date Sujet#  Auteur
1 Aug 24 * Array vs. Linked List Traversal7jseigh
1 Aug 24 +* Re: Array vs. Linked List Traversal2MitchAlsup1
2 Aug 24 i`- Re: Array vs. Linked List Traversal1Lawrence D'Oliveiro
1 Aug 24 +- Re: Array vs. Linked List Traversal1Anton Ertl
1 Aug 24 `* Re: Array vs. Linked List Traversal3Stefan Ram
1 Aug 24  +- Re: Array vs. Linked List Traversal1Chris M. Thomasson
2 Aug 24  `- Re: Array vs. Linked List Traversal1Stephen Fuld

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal