Sebastian Schöner

@sschoener@mastodon.gamedev.place

What I learned about debug performance of C++ vector math: blog.s-schoener.com/2025-08-07

August 7, 2025 at 12:20:45 PM

Always nice to see specific numbers, even if the underlying idea (without optimizations enabled your function heavy code is slow) is not exactly novel.

Re the last paragraph, O1 for debugging is okay, but I recommend trying Og instead. Clang no longer implements it as an alias of O1, so it will likely keep getting better in the future.

Oh great, I did not know that -Og is now a separate thing! Thank you.

Also, in a world with ChatGPT it's impossible to write something novel. I've given up on that a long time ago. It's the age old "it will be novel for someone". Applying novelty as a standard for your own writing will just mean you write no longer, and nobody benefits :)

I've added some numbers for -Og. It turns out that -Og still behaves as -O1; it's the same set of optimization passes. It only adds to it by also setting -fextend-variable-liveness=all. (That's on trunk, not on Clang19.)

Yeah, I originally complained in my reply about Og being alias of O1 in Clang... and then double checked and found out that it is not true anymore.

I am hoping it will become a more fully fledged optimization option in the future, the way it is in GCC.

Elk Logo

Welcome to Elk!

Elk is a nimble Mastodon web client. You can login to your Mastodon account and use it to interact with the fediverse.

Expect some bugs and missing features here and there. Elk is Open Source and we're actively improving it as a community project. Join us and let's build it together!

If you'd like to report a bug, help us testing, give feedback, or contribute, reach out to us on GitHub and get involved.

To boost development, you can sponsor the Team through GitHub Sponsors. We hope you enjoy Elk!

Daniel RoePatakAnthony FuTAKAHASHI ShuujiJoaquín Sánchez三咲智子 Kevin Deng

The Elk Team