-
-
Notifications
You must be signed in to change notification settings - Fork 59
Performance: Erg vs CPython #438
-
Is there any Performance comparison between Erg and CPython with same algorithm and similar paradigm?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments 4 replies
-
The only backend that Erg currently has is CPython. That is, it runs on the CPython interpreter. In this sense, there is no performance difference between Erg and Python.
However, Erg has compile-time optimization capabilities, e.g., the optimizer removes unused variables and modules. This may allow Erg to perform better than Python.
And I am currently developing a native code backend, that means, it does not depend on CPython. Using this, Erg should get the same execution performance as a regular compiled language.
But note that Erg's main goal is not to speed up Python (if you expect that, perhaps you should use Mojo) but to improve the Python developer experience with a static type system, which is the same approach as TypeScript. Performance is a byproduct. The main motivation for developing a native code backend is the ease of distribution of single binaries, etc.
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi,
this is a naive question, since I don't know much about the implementation details: But instead of using Python byte code use MLIR and share code with Mojo ?
Beta Was this translation helpful? Give feedback.
All reactions
-
Completely unrelated:
What do you think of these ideas by one of the authors of the Web assembly platform:
1ML is a reboot of ML starting from first-class modules, and unifies core and module layer into one small and consistent language ...
See more on this page:
https://people.mpi-sws.org/~rossberg/1ml
Beta Was this translation helpful? Give feedback.
All reactions
-
I understand that 1ML is the practice (or advancement?) of F-ing modules, that is, describing the ML module system with System Fω.
But to be honest, I do not understand the details at all and cannot comment any further.
Beta Was this translation helpful? Give feedback.
All reactions
-
Me neither - I remember that I heard a talk and that I was fascinated, but I could not really decipher the paper nor the explication on github.
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi, this is a naive question, since I don't know much about the implementation details: But instead of using Python byte code use MLIR and share code with Mojo ?
It may be possible. But Erg is focused on interoperability with Python, and I don't think Mojo is a drop-in replacement for Python at this time.
Also, in my personal opinion, I don't think the current Mojo (Modular Inc.) approach ― a closed source language developed by one company ― will be successful. At least until the entire source code of Mojo is open, I have no intention of using it seriously.
But using MLIR does not seem like a bad option.
Beta Was this translation helpful? Give feedback.