Hacker News new | past | comments | ask | show | jobs | submit login

Why do lists provide better memory locality than arrays? The array already stores its elements next to each other in memory. The compacting GC helps arrange the elements of the list close to each other too, right? Then wouldn’t the compacting GC at best even out the performance difference for sequential traversal?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: