Difficulty: Medium
Category: memory_optimization
Practice quant interview questions from top firms including Jane Street, Citadel, Two Sigma, DE Shaw, and other leading quantitative finance companies.
Topics: c++, concurrency, memory_optimization, low_latency
False sharing significantly degrades performance in low-latency trading systems by triggering excessive cache coherence traffic when threads modify independent variables on the same cache line. Mitigating this requires explicit memory alignment to ensure frequently updated atomic counters reside in separate cache lines. Task Implement a struct named CacheAlignedCounters containing two public std::atomic<int> members, a and b, both initialized to 0. Apply alignas using std::hardware_destructive_
Practice this medium developer interview question on MyntBit - the all-in-one quant learning platform with 200+ quant interview questions for Jane Street, Citadel, Two Sigma, and other top quantitative finance firms.