3 ms·
Well, there is a python compiler. And the compiled code is fast (although, the compile times are absurdly long). Specifically, RPython is a compiled language, a
by overgard 11y ago
Well, there is a python compiler. And the compiled code is fast (although, the compile times are absurdly long). Specifically, RPython is a compiled language, and PyPy is written in RPython. So yeah, it's possible, and it has been done, but on the other hand... RPython is only superficially like Python, the semantics are vastly different. It's technically a subset, but the way you approach writing it is way different. It tends to feel like C with some syntactic sugar. So I don't think that invalidates what I'm saying, I think it actually demonstrates it: if you want efficient code the language needs to make efficiency a priority.
- spoiler 11y agoI agree, although I wouldn't say efficiency needs to be a priority. The language should simply be aware of the machine model instead of abstract those. It should know there's a processor, and that there's memory. Crystal does a pretty good job at being efficient without sacrificing much!