|
|
|
|
|
by SunnySkies
3132 days ago
|
|
You're misunderstanding the advice about contiguous. It's not that it's more likely to stay in cache, but if you're accessing data sequentially it's more likely the data you're going to access next is already in cache. Most (all I've read/looked at) benchmarks in Java have data structures backed by linked lists utterly smashed by things implemented by an array. There was in the last year or two a good c++ talk where a game or game engine changed their storage to be more array like and got roughly a 30% boost in performance. Memory locality is usually king, which is why linked lists are rarely used. |
|
https://youtu.be/rX0ItVEVjHc
https://en.m.wikipedia.org/wiki/Data-oriented_design