Live data from Hacker News

Python-based compiler achieves orders-of-magnitude speedups

news.mit.edu

31–40 of 193 posts

Re: Python-based compiler achieves orders-of-magnitude speedups

#32
post #3

So the differences: https://docs.exaloop.io/codon/general/differences So more limited types (integers) and more type checking and collections have to have one kind of thing in them. There are other python compilers though, like https://github.com/Nuitka/Nuitka I wonder really what the advantages/disadvantages of these are?

Another big difference: "Codon is licensed under the Business Source License (BSL), which means its source code is publicly available and it's free for non-production use. ... each version of Codon converts to an actual open source license (specifically, Apache) after 3 years."

https://docs.exaloop.io/codon/general/faq

Re: Python-based compiler achieves orders-of-magnitude speedups

#33

I have no idea about compilers, so bear with me with this question: Can't we have a faster compiler for a subset of Python? I mean AFAIK the hard part of Python is that the language allows dynamic overwriting of attributes (or something like that). Is that feature actually needed for projects like Django, FastAPI, numpy, etc? Maybe I'm wrong, but the main idea I'd like to ask is, can we make a compiler for a subset o…

> Can't we have a faster compiler for a subset of Python?

That's exactly how PyPy works.

Re: Python-based compiler achieves orders-of-magnitude speedups

#34
post #31
post #26

nit: 'Python-based' would imply to me that it's written in Python, but it looks like it's mostly C++ & LLVM: https://github.com/exaloop/codon/tree/develop/codon

Hardly a nitpick. It's key to the claim.

It's a little sad because PyPy literally is written in (a restricted subset of) Python, hence the name.

Re: Python-based compiler achieves orders-of-magnitude speedups

#35
post #3

So the differences: https://docs.exaloop.io/codon/general/differences So more limited types (integers) and more type checking and collections have to have one kind of thing in them. There are other python compilers though, like https://github.com/Nuitka/Nuitka I wonder really what the advantages/disadvantages of these are?

Another big difference: "Codon is licensed under the Business Source License (BSL), which means its source code is publicly available and it's free for non-production use. ... each version of Codon converts to an actual open source license (specifically, Apache) after 3 years." https://docs.exaloop.io/codon/general/faq

Compilers traditionally don’t taint users code with their own license, seems this one does.

Re: Python-based compiler achieves orders-of-magnitude speedups

#36
Can we please not?

Humanity wasted close to 50 years optimizing compilers for one garbage language. Wasted unimaginable efforts, money and developer hours... and all could've been avoided if the same people dedicated a fraction of those resources to language design.

Same thing happened with Java. And now the existence of a well-developed compiler became an argument in its own right in favor of choosing a bad language.

There's no need or reason to try to make Python run faster. It's a trash language. At best, it deserves a credit for being funny 30 years ago... but that had worn out pretty fast. Now it's just dumb. Improving its compiler will be again a resource sink for the programming community that, in the best case, may hope to produce something of value by accident, independent of its main goal...

Re: Python-based compiler achieves orders-of-magnitude speedups

#37
"So we thought, let’s take Python syntax, semantics, and libraries and [...] Codon currently covers a sizable subset of Python, it still needs to incorporate several dynamic features and expand its Python library coverage. The Codon team is working hard to close the gap with Python even further".

Re: Python-based compiler achieves orders-of-magnitude speedups

#38

Can we please not? Humanity wasted close to 50 years optimizing compilers for one garbage language. Wasted unimaginable efforts, money and developer hours... and all could've been avoided if the same people dedicated a fraction of those resources to language design. Same thing happened with Java. And now the existence of a well-developed compiler became an argument in its own right in favor of choosing a bad language…

yet its the language of choice for several people who are domain experts but not programming experts. It's doing a job for non-programmers who have to program. until a solution exists that does better, python is going nowhere.

Re: Python-based compiler achieves orders-of-magnitude speedups

#39

Can we please not? Humanity wasted close to 50 years optimizing compilers for one garbage language. Wasted unimaginable efforts, money and developer hours... and all could've been avoided if the same people dedicated a fraction of those resources to language design. Same thing happened with Java. And now the existence of a well-developed compiler became an argument in its own right in favor of choosing a bad language…

[deleted]
Post reply on HN