Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Performance: Erg vs CPython #438

evan0greenup started this conversation in General
Discussion options

Is there any Performance comparison between Erg and CPython with same algorithm and similar paradigm?

You must be logged in to vote

Replies: 2 comments 4 replies

Comment options

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.

You must be logged in to vote
4 replies
Comment options

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 ?

Comment options

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

Comment options

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.

Comment options

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.

Comment options

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.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /