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.
CaptainCactus124@reddit
Pretending this is not an ad for your website.
C++ is old magic. It’s not going to hold your hand. It’s not always going to give you sensible defaults. It’s an OG programming old af language and doesn’t need to answer to any of this. It’s had its legacy, it doesn’t need to prove itself to anyone.
My game engine doesn’t use the standard containers, has aliases for common number types, has multiple toolchains for building on different operating systems. Has a cmake file that makes the most convoluted maven or package.json look like a three year old’s attempt at a grocery list.
The other day I had to refactor a ton of code because some windows header had a macro defined overwriting a class named TokenType and I renamed it to make it happy. This is just another day for me.
Junior developers shouldn’t be architecting c++ projects. A junior developer in a sensible project is not going to have this issue because it would have already been established what container types the project uses.
Go use Rust, c++ devs don’t give a shit. I don’t give a shit. I program in c++, c#, and JavaScript / typescript with node and I love them all and I don’t give a flying fuck.
It is a skill gap. The skill is discernment.
ze_pequeno@reddit
Ai slop ☝️
ThrowAwayP3nonxl@reddit
AI description. Don't wanna read.
Difficult_Truck_687@reddit (OP)
Baader-Meinhof
SureConsiderMyDick@reddit
cannot read
Difficult_Truck_687@reddit (OP)
It's free - but you need to log in.