Tags

#Restrict

1 post

Low-Latency Systems Development #10 14 min read

Pointer and Memory-Access Optimization

In a loop like a[i] = *b, the compiler re-reads *b every iteration, because writing a[i] might change it. Pointer optimization is about letting the compiler read less, and fitting linked structures into nearer caches.