I spent a few months building a FIX protocol engine from scratch in C++23. Not because the world needed another one, but because I wanted to see how far modern C++ can take a FIX engine compared to QuickFIX.
QuickFIX was written by people who knew what they were doing. It also reflects the constraints and tooling available at the time. But it's very much C++98/03 era code: custom object pools, hand-rolled lock-free queues, manual cache line alignment. A lot of infrastructure that today overlaps with standard or near-standard tools.
The surprising part was how much of that code simplifies with C++23.
The original object pool was ~1000 lines of allocation logic. In the new version that's std::pmr::monotonic_buffer_resource with per-message reset.
Tag lookup went from a large switch with 50+ cases to a consteval table computed at compile time, O(1) at runtime with no branches.
Delimiter scanning went through three SIMD approaches (intrinsics, Highway, xsimd). Ended up going with xsimd. Maintaining separate AVX2/AVX-512 paths wasn't worth the extra complexity for ~5% throughput.
Current result (microbenchmarked with RDTSC, single-core, warmed cache, using synthetic FIX messages): ExecutionReport parse ~246 ns vs ~730 ns for QuickFIX on the same input, over 100K iterations.
No heap allocations on the hot path.
Not production-ready yet, but the parser and session layer are stable enough to compare.
A couple of things still being figured out:
- Header-only at ~5K LOC. Compiles fine locally, but not sure where CI starts to struggle
- Only covering 9 FIX message types so far. Interested in any edge cases people have run into
https://github.com/StratCraftsAI/NexusFix