~/talk

Low-Latency Trading Systems in C++: Templated Meta-State Machines in HFT

Talkat ACCU 2023 · 2023-04-19..04-22· [c-and-cpp]

Generates a computed goto from heavy template meta-programming: a templated meta-state-machine using an unordered_tuple of placement-new transitions and a constrained_override_type to recover type-safe virtual-like dispatch. Builds a custom perfect-hash by brute force with a data-parallel finder (single-thread brute force ~15 min, parallel ~2 min) and emits header-instantiated hash templates. Result: computed-goto is achievable but compile- and build-costs explode, performance gains versus naive if-else are marginal and compiler-dependent, hitting the noise floor.

AI-written summary · about

  1. 0:00Low-latency trading systems intro
  2. 1:25Templated meta-state machines in HFT
  3. 10:57Premature optimization pitfalls
  4. 27:37Constrained override type design
  5. 45:32Unordered tuple for state transitions
  6. 51:44Minimal perfect hash functions
  7. 1:00:19Micro-benchmarking meta-state machine
  8. 1:06:03Full-system performance results
  9. 1:14:54Complexity vs maintainability
  10. 1:20:51Conclusions and lessons
  11. 1:24:30Epilogue
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.