Re:C and C++ Prioritize Performance over Correctness
by nostrademons on Friday August 18, 2023 @11:01PM
(#37185051)
That's sort of the point. If you want to make programs really fast and really expressive, your target language ought to be as close to the hardware as possible, and your source language ought to be as expressive as possible, and then you just write a compiler to translate between them.
A program which constructs an AST out of python classes and spits out GPU code is a compiler. The python is never executed.
Trivially, compilers can generate code faster than their hose language, but that doesn't make the host language fast. The compiler would be even faster if it were written in C++.