There are very few more heated arguments in this world that two C++ developers arguing about the correct way to do things.
This toot brought to you by the two day long argument I'm reading about `std::to_underlying` for C++ enum classes.

Also C++ devs who took Abrash's "measure to know the performance of something" waaaay to seriously.

Like, I can know certain practices hinder performance of things without measuring.

This is why SIMD APIs exist. Compilers are pretty magical, but they're not *that* magical.

This is something I find really really interesting about a lot of C++ devs. The language is supposed to be all about performance, but a lot of the arguments are about best practice within the language, proper architecture, avoiding footguns, and so often arguments specificly about high performance architectures are scoffed at in favor of "proper OOP" or assuming that you can't know something is high performance without measuring.

It's baffling.

@fuzzybinary I think the trick is that it’s different things to different people. I’ve worked with embedded engineers who were afraid of C++ because it was too high level, game devs who’ve loved it but had strict rules against OOP/inheritance/the virtual keyword, and app devs who considered it some sort of ancient artifact beyond comprehension “don’t touch the .so, it’s what makes our app fast!” but otherwise needed the oop abstractions. And all of them will duke it out on forums 😆
@pux0r3 Yeah. Actually, something I read in Effective C++ which I'd NEVER thought about (and that book is how old!?) that C++ is actually 3 languages, and it's practicies are different based on which version of the language you're using.
@pux0r3 The praticular interaction I'm a bit miffed about was talking about Data Oriented Design in C++ and its perf benefits because of cache coherency. The other dev (who is very smart and works in very high perf environments, don't get me wrong) was just kinda like "You can't know that you have to measure."

@fuzzybinary Definitely makes sense in the context of the ContiguousArray post sibling to this one too.

It also leads me into my mixed feelings around the statement of “pre-emptive optimization is the root of all evil.” On the one hand, min/maxing performance before an app is “done” is almost counter-productive, on the other hand lived experience usually says “I’ll probably have to do this eventually, it will look a bit ugly and not measure much now — but it’s saved my butt before!”

@fuzzybinary But also, I got someone very annoyed when I instinctively did `>> 1` or `* 0.5` instead of `/2` because they were once faster on an old compiler for an old architecture that doesn’t apply now. And I totally get it 😆

@pux0r3 I love one of the first best practices in C++ Best Practices: "Don't prematurely pessamize".

And you're right that some things are now dumb because the compiler can optimize it better than you, but specifically in C++ it *can't* rearrange data. And it can't skip constructors or destructors in certain circumstances. And it can't optimize away the v-table jump.