4 ms·
> implemented in Python, A program which constructs an AST out of python classes and spits out GPU code is a compiler. The python is never executed. Triviall
by commonlisp94 3y ago
> implemented in Python,
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++.
- nostrademons 3y agoThat'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.