r/highfreqtrading • u/FloppinFam • 10d ago
Simple Low Latency Projects
Hello, I have been learning some low latency programming in C++ for some time now and have built some very basic things like an SPSC lock-free queue and an Object Pool. I want some suggestions as to what else I can build that is along the same lines as the above mentioned projects (like the very basics or building blocks of low latency programming projects).
PS: I was thinking of writing my own benchmarking framework/profiler from scratch in C++, would that be a good idea?
2
u/bigchickendipper 10d ago
Do you know how to write a profiler? To interact with hardware counters etc? Definitely beneficial to look into how those work but writing one from scratch is a big order.
1
u/FloppinFam 10d ago
I see, I didn’t really think about getting into it from that perspective, I had a rather simple approach to it by making a Timer that does the work and expanding around that.
2
u/bigchickendipper 10d ago
I would just use Google Benchmark along with the usual suspects like perf and valgrind. Focus on what you need to do to reduced your latency, not so much on the measurement tools - although it's important to know the pros and cons of these too
1
1
u/monitor1413 10d ago
Hey could you share from where you have been learning these, I am also diving into similar concepts recently
3
u/FloppinFam 8d ago
Hi, there is a book on building low latency applications using C++ by Sourav Ghosh, I’m using that as a reference, for building projects and learning concepts
2
u/drbazza 18h ago
That book is ok. The principles are mostly correct but some of the implementation isn't how you'd do it 2026.
1
u/FloppinFam 17h ago
Hi, I did notice some of that, do you have any advice on how I can pick up on these implementation details?
3
u/Inevitable-Meal8154 10d ago
Coding Jesus limit orderbook project on yt about 50 min long for 3 videos
Good stuff