Sujet : Re: Array vs. Linked List Traversal
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.archDate : 02. Aug 2024, 00:14:40
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v8h4t0$2e5g0$5@dont-email.me>
References : 1 2
User-Agent : Pan/0.159 (Vovchansk; )
On Thu, 1 Aug 2024 15:49:35 +0000, MitchAlsup1 wrote:
The next element address in an array can be found by addition
The next element address in a linked list can be found by a load
With cache hits, add is 1 cycle
With cache hits, load is 3-4 cycles
Hence the term, “pointer-chasing”.