Re:Ask HN: What are some cool but obscure data structures yo...
by celeritascelery on Friday July 22, 2022 @09:19AM
(#32191596)
Wouldn’t that hurt locality? Since now you need to do multiple access across the entire heap to reconstruct one object.
[ Parent
| on HN ]
Re:Ask HN: What are some cool but obscure data structures yo...
by DoubleFree on Friday July 22, 2022 @09:26AM
(#32191659)
It 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.
Re:Ask HN: What are some cool but obscure data structures yo...
by adwn on Friday July 22, 2022 @10:24AM
(#32192151)
You 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.