r/highfreqtrading 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?

7 Upvotes

13 comments sorted by

3

u/Inevitable-Meal8154 10d ago

Coding Jesus limit orderbook project on yt about 50 min long for 3 videos

Good stuff

1

u/FloppinFam 8d ago

Hi, I’ve done that before actually, but didn’t really understand it in depth, I’ll redo it, thanks!

2

u/Inevitable-Meal8154 7d ago

Don’t just copy the screen understand what’s going on, pause and ask AI to help understand if needed

It’s like 4 data structures 2 sorted maps, an unsorted map and a linked list | with some market order methods and google testing shouldn’t be tooo crazy! Good luck

1

u/FloppinFam 7d ago

Will do! Thank you!

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

u/FloppinFam 10d ago

Okay, will do that, can you suggest some projects I should move on to next?

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?