About this question
Easy · low_latency · Quant Developer interview question · prefetch, __builtin_prefetch, cache, low_latency, memory-access, simd
In low-latency trading, sequentially scanning large price arrays is a common bottleneck. Software prefetching allows developers to explicitly hint to the CPU to load data into the cache before it is needed, hiding memory latency. This technique is crucial for optimizing hot-path computations in market data handlers and signal processing engines. Task Implement the function compute_sum(const double prices, int n) to calculate the sum of all elements in a price array. On each iteration i, issue a
Keep practicing