@Doomed_Daniel@mastodon.gamedev.place
Post #2716218
2026-04-24 19:34 UTC
@TomF@mastodon.gamedev.place
Doesn't that propagate down?
Like, if I have a performance problem in C++, how does it help me to know what the equivalent C-code is if I need to know assembly to figure out why that code would be slow?
Replies (1)
-
@TomF@mastodon.gamedev.place 2026-04-24 19:36
@Doomed_Daniel@mastodon.gamedev.place It's a rule of thumb. In general, I find that most C++ perf problems are because you're doing too many alloc/frees, and too many virtual calls. Those are solved by thinking about C. Yes, if you then discover you're thrashing caches or causing too many branch mispredictions, then that's actually a good problem to have - it means your code is faster than almost all other C++ code. Well done.