Noexcept doesn't mean "this function doesn't use exceptions", it means "this function doesn't throw exceptions". The difference being that a child function can throw, but std::terminate will be called once a noexcept function is unwound. There's no standard way to specify the former, only compiler flags.

C++ can be used to write code that generates assembly equivalent to pretty much any C. A lot of standards committee work goes into ensuring that's possible. The trade-off is that it's the closest thing humans have ever produced to a lovecraftian programming language.

If every function is marked noexcept, does it make a difference? Either way, the point of C++ exceptions was to make the fast path even faster by moving error handling out of it. Since they had no idea what was wrong, the code evidently was running in the fast path since it was not terminating by throwing exceptions, yet it ran slower merely because of the C++ exception support.

In any case, my point is that C++ features often carry overhead that simply does not exist in C. Being able to get C++ code to run as fast as C code (possibly by not using any C++ features) does not change that.

Yes, but you can not achieve faster code in C++ than you can also achieve in C and the use of templates or dynamic dispatch certainly can come with a cost. I would also argue than you can write similar abstractions also in C with very similar trade-offs. The difference is mostly that C has less syntactic sugar but everything is more obvious.

I'd love to see any examples you have of compile time metaprogramming libraries like Eigen or CTRE written instead in C. You can do a little of that with _Generic, but I'd generally prefer the nightmare that is templates to most of the hardcore macro magic I've encountered (e.g. Boost.PP), let alone constexpr.

I think this is asking the wrong question. In many case it would be smarter to implement these algorithms using high-level abstractions and then let the optimizer specialize it again. This works very well also in C:https://godbolt.org/z/bohvffd7r I use it a lot, but I am not aware about a public project similar to Eigen. I definitely convinced this could be done and would be very nice. One downside is that one might want to have more precise control. But even then there are solutions which IMHO are better than template metaprogramming.

That's what Eigen does. You write the high level statement and it does template magic to convert that into an optimized series of BLAS calls, even omitting or combining calls (something impossible to do with just _Generic). CTRE does something similar. The parsing all happens at compile time, so code is only paying the cost of matching (which benefits from all the standard compiler optimizations). There's a platonically ideal compiler somewhere out there that could do both of these jobs too, but compilers are difficult enough and need to run fast enough that implementing every possible optimization in every domain isn't going to happen.

I know what Eigen does. The point I tried to make is that you can let the optimizer specialize the code instead of a template engine and this is much cleaner. If you want to do arbitrary transformations, you can just run a program at compile-time. This is still much nicer than have template code and even more powerful.