3 ms·
Wouldn’t that hurt locality? Since now you need to do multiple access across the entire heap to reconstruct one object.
by celeritascelery 4y ago
Wouldn’t that hurt locality? Since now you need to do multiple access across the entire heap to reconstruct one object.
- DoubleFree 4y agoIt depends. For operations or aggregates on a single field, it improves cache locality, whereas if operations act on all, or most, fields of the struct, it hurts cache locality. The exact same tradeoff differentiates OLTP (transactional/row stored) databases and OLAP (analytics/column stored) databases.
- adwn 4y agoYou wouldn't typically use this when you need lots of random accesses, but when you process the data sequentially. It also simplifies and speeds up SIMD loads and stores, because you can load/store entire SIMD registers with a continuous, non-strided memory access.