Difficulty: Hard
Category: Code Analysis
Practice quant interview questions from top firms including Jane Street, Citadel, Two Sigma, DE Shaw, and other leading quantitative finance companies.
Topics: C++, virtual functions, performance, latency, optimization
In a latency-critical trading system, you're optimizing a hot loop that processes incoming market data. This loop frequently calls a virtual function process() on objects pointed to by a base class pointer. You need to understand the performance implications of this virtual dispatch mechanism. Consider the following overheads: 1. vtable lookup: The process of finding the correct function to call based on the object's actual type. 2. Cache miss potential: The chance that the vtable or the funct
Practice this hard trader 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.