Welcome to the Low Latency League — NUFT’s internal challenge to build the fastest matching engine.
Your job is simple: optimize the provided engine in engine.cpp/hpp. Your code must pass all tests (make test) to qualify.
Submit your code for benchmarking by running make submit. You must be on black or scholes. Only your latest submission counts — submit as often as you like. A live leaderboard tracks results at Low Latency League Tracker.
The benchmarks simulate somewhat realistic trading conditions. For example, order prices tend to have relatively low variances (if AAPL is at $100, most orders will be within a few dollars of that).
- Anything reasonable is fair game. There are no strict memory limits or library restrictions. Add Abseil? Sure. Use 5GB RAM? Fine. Rewrite in Rust and use 64GB RAM? Not fine.
- You must not change any function signatures in
engine.hpp. - Don’t try to break things or cheat. Use common sense.
- Profile everything. Don’t guess — use
perf,callgrind,uProf, whatever gives you answers. - Start with the obvious. Think cache misses, branching, mallocs, mutexes — the basics.
- Only speed counts. If it doesn’t make the engine faster, it doesn’t matter.
- The order flow has structure. Prices cluster. Use that.
- Keep your hot path lean. No heap allocs, no virtuals, no slow maps.
- Modern C++ is your friend —
std::span,std::pmr, inlining tricks, etc. - Don’t get clever unless you can prove it’s faster.
- You're allowed to add external libraries as long as it still compiles into engine.so