Trading at light speed: designing low latency systems in C++ - David Gross - Meeting C++ 2022

Meeting Cpp · 305K views · 2023 · 59:45

Open on YouTube

C, C++, Rust, Go & systems languagesSoftware performance & optimizationSoftware architecture & designtalk

Why Stack Overflow recommends it

Stack Overflow users link it when discussing low latency C++, shared-memory tick data, rdtsc timing and cache-friendly container layouts.

Recommended by 1 people across 1 different months, 2023 to 2025.

What it is

A Meeting C++ 2022 talk by David Gross, Auto-Trading Tech Lead at Optiver, on designing low latency trading systems in C++ from the start rather than optimising later. It covers hardware-aware data models, stable vectors, seqlocks and SPMC queues, and system tuning such as C-states and shared LLC.

What people said

Recommends Pepijn Kramer · 2025-06 · Stack Overflow · on “How can I efficiently share high-frequency tick data between two local C++ processes using shared memory?”

You can also learn a lot by watching videos from cpp conferences (google : "cppcon high frequency trading data") : e.g. Trading at light speed: designing low latency systems in C++ - David Gross - Meeting C++ 2022 [this video] ... and there are many more

Cites Long Bu · 2023-02 · Stack Overflow · on “Why is my interval of consecutive rdtsc calls periodic?”

I am profiling interval of consecutive rdtsc calls as suggested by this talk by David Gross [this video] . My system is aws c5a.8xlarge instance, ubuntu 22.04 LTS server, no other user packages installed and there is no any other work load on it. Each data point on below graph is the mean/std deviation of interval of 256 consecutive rdtsc calls. (eg. mean/std deviation of 255 intervals). I do the 256 calls once a second, As you can see in the graph, it's periodic. Can anybody explain this for me? thanks. The cpu frequncy is 2799.932 Mhz from cpuinfo. I converted the rdtsc value to nanosecond by dividing it with 2.799932. [LINK] The code of mean/std calculation for one data point is as below: std:

Cites blanNL · 2023-03 · Stack Overflow · on “What is the advantage of using a pointer to an object as the value in std::unordered_map?”

In the youtube clip Trading at light speed: designing low latency systems in C++ - David Gross - Meeting C++ 2022 [this video] The presented presents the following: std::unordered_map<InstrumentId, Instrument> mInstruments; // Upsides: Contiguous memory, cheap lookup // Downsides: Random memory access ("Linked list") std::vector<Instrument> mInstruments; std::unordered_map<InstrumentId, Instrument*> mInstruments; // Upsides: Contiguous memory, cheap lookup // Downsides: expensive resize which invalidates pointers Why is this an improvement? Isn't there still a linked list, only now with pointers instead of full objects? So you still have random memory access?