Eviscerated by Rust: Overcoming C++'s 58x Standard Library Handicap

Posted by Difficult_Truck_687@reddit | ExperiencedDevs | View on Reddit | 6 comments

The C++ standard library's default containers are a performance disaster. Not a minor inconvenience. Not a "it depends on the workload" caveat. A 58x P99 latency penalty compared to Rust's standard library, on an identical order book workload, with the same seed, same venue, same CPU cores.

Or switch to Rust, where the standard library ships the right defaults and you don't need to know any of this. A junior Rust developer using HashMap, BTreeMap, and VecDeque — the first containers they'll find in any tutorial — gets 5,177 cycles P99 on a workload that punishes bad containers mercilessly. A junior C++ developer using the standard library gets 302,653.

That's not a skill gap. That's a standard library gap. And after 28 years of C++ standardization, the committee still hasn't closed it.

Full Article