Get the latest tech news

Optimize the Data Layout


The underlying data layout of your program can either help or hurt your algorithms. We explore how to improve the runtime of your program by analyzing the impact of the data layout on low-level properties such as cache line optimizations and SIMD execution, as well as other memory-level optimizations such as compression.

Even with optimal algorithms, poor data layout can lead to frequent cache reloads, stalled pipelines, and excessive memory transfers, all of which reduce performance. Note that the experiments are completely in-memory and much higher differences are expected if the data resides on lower bandwidth storage devices instead of fast main memory. Lightweight compression methods, such as run-length (RLE), frame-of-reference, or delta encoding, provide fast and efficient ways to reduce memory consumption without sacrificing access performance.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Data Layout

Data Layout