About this question

Hot/Cold Data Splitting for Cache-Efficient Trade Struct

Medium · low_latency · Quant Developer interview question · hot-cold-splitting, cache-locality, struct-layout, low_latency, soa, memory

Hot/cold data splitting is a memory layout optimization that separates frequently accessed ("hot") data from infrequently accessed ("cold") data into distinct structs. This technique improves cache efficiency by ensuring that hot data paths only load necessary fields, maximizing the use of limited L1/L2 cache. In quantitative finance, this is critical for low-latency systems like matching engines and feed handlers to reduce memory-related stalls. Task Implement the function make_hot(double pric