Part I: A Performance Analysis of a Trading System over Compliers
summary
Implements a real FIX-to-MIT/BIT translator and measures it across GCC, Clang and ICC versions, kernels and an AMD Bulldozer box; finds compiler optimizers are unstable so identical C++ produces wildly different latency and throughput (orders-of-magnitude gaps, one benchmark shows ~10^15 ops because code is optimized away), handcrafted memcpy and template metaprogramming versions sometimes slow the whole system, static branch prediction and __builtin_expect often hurt, switch lowering avoids jump tables, and Spectre/Meltdown results contradict common expectations.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:32HFT Overview and Risks
- 4:07Compilers and Trading Tech
- 6:56System Infrastructure
- 8:35Low-Latency Software Design
- 14:06Compiler and Hardware Analysis
- 18:03Compiler Quirks and Memory
- 20:48Performance Benchmarking
- 25:03Branch Prediction Analysis
- 30:45Switch Statement Optimization
- 36:37Custom Memcpy and Conclusion
related talks
52mWriting fast C code for a modern CPU (and applying it to PostgreSQL)
01h 00mAchieving performance in financial data processing through compile time introspection
01h 05mImplementing Understandable World Class Hash Tables in C++
39mTransactor Performance Theory & Practice
45mBeyond Lists: High Performance Data Structures
48mPragmatic Code Generation for Efficient Execution
51mThe Diabolical Developer's Guide to Perfomance Tuning
38mFinding a needle in the haystack - Debugging performance issues
