CSCI 3907: What about Rust?
From Nanosecond C++: Mastering Low-Latency Patterns for High-Frequency Trading:
- Maturity and Ecosystem: The C++ HFT ecosystem is decades old. The
C++ compilers (GCC, Clang) have been obsessively optimized for performance
by the entire industry for over 30 years. The low- level libraries,
kernel-bypass tools, and, most importantly, the existing pool of expert
developers with deep hardware knowledge are overwhelmingly in the C++ camp.
- The "Safety" Philosophy: Rust is designed to be safe. The borrow checker is its greatest feature, enforcing memory safety at compile- time. But this safety-first philosophy, while a blessing 99% of the time, can get in the way of the 1% of "tricks" that HFT demands. The C++ philosophy, by contrast, has always been: "Trust the programmer." C++ gives you the raw, dangerous, and total control to do whatever you want.... While Rust can do most of this inside an unsafe block, the C++ language is built on this philosophy of "the developer is king." In HFT, the developer must be king, because we are often writing code that is more closely aligned with the hardware than with high-level software abstractions.