You might have an interesting project, for all my C++ projects, -O1 is significantly faster than -O0 (~2x faster).
Or maybe my projects are the interesting ones :D
Or maybe my projects are the interesting ones :D
My project is c, which is why I can use tcc.
Anyway, that makes sense; in c++, there's a lot of 'extra' stuff, single lines of code that add up to much more than they would seem. I bet -O1 lets the compiler inline a lot of std::move, smart ptr semantics; elide monomorphisations, copy constructors/RVO; etc. Which just means less code to spit out the backend.
Yes for C what you mention makes perfect sense.
I agree with you about C++ as well. In particular, C++ templates end up expanding a lot of duplicate code, and at O1 the compiler can remove them.