Home / Companies / TigerBeetle / Blog / Post Details
Content Deep Dive

Enum of Arrays

Blog post from TigerBeetle

Post Details
Company
Date Published
Author
matklad
Word Count
754
Company Posts That Month
1
Language
English
Hacker News Points
-
Post removed?
No
Summary

The text explores the benefits of using a Struct of Arrays (SoA) and an Array of Enums (AoE) in data-oriented design, highlighting their advantages in memory usage and processing efficiency. SoA reduces memory padding and enhances memory bandwidth utilization by organizing data fields into separate arrays, which is particularly beneficial for operations requiring SIMD optimizations. Similarly, converting AoE to an Enum of Arrays (EoA) minimizes the memory footprint of tags by amortizing them across batches of objects and reduces CPU branching, thereby facilitating faster processing. The example of TigerBeetle illustrates this concept, demonstrating how homogeneous batches of operations improve efficiency by minimizing control plane overhead and maximizing data plane throughput.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.