Live data from Hacker News

Codon: A high-performance Python-like compiler using LLVM

github.com

21–30 of 184 posts

Re: Codon: A high-performance Python-like compiler using LLVM

#21
post #9

would love to see actual benchmarks

We do have a benchmark suite at https://github.com/exaloop/codon/tree/develop/bench and results on a couple different architectures at https://exaloop.io/benchmarks

Why are do the C++ implementations perform so poorly?

Re: Codon: A high-performance Python-like compiler using LLVM

#22
post #7

Earlier quoted context omitted.

It's also confusing... I mean, what does "non-production use" mean anyway? Does it mean "non-commercial use"? Or "testing/debug/staging environment"? Or "does not produce any valuable output"...?

It means if a company uses this program, they can't use it without paying the developer.

But companies can still experiment with it without paying. IE, you can integrate it and run benchmarks to see if it would actually help your pain points.

Re: Codon: A high-performance Python-like compiler using LLVM

#23

Free for non-production use... it's a "no" for me.

I have not dug into the project yet, but if it delivers on the features it mentions it should be a game changer for a lot of companies, heavily invested in Python.

Paying to use it seems fair.

Re: Codon: A high-performance Python-like compiler using LLVM

#24
post #7

Earlier quoted context omitted.

It's also confusing... I mean, what does "non-production use" mean anyway? Does it mean "non-commercial use"? Or "testing/debug/staging environment"? Or "does not produce any valuable output"...?

According to this article https://perens.com/2017/02/14/bsl-1-1/ about the Business Source License, the intention conveyed by the word "production" for that license is use "in any capacity that is meant to make money".

> "in any capacity that is meant to make money"

I'll note that that's the definition of "commercial".

Re: Codon: A high-performance Python-like compiler using LLVM

#25

after reading it's not a python compiler but a compiled language based on the python syntax

One of the faq things refers in passing to integers being 64bit instead of arbitrary precision. That's a bit more fundamental than some cpython modules don't work. Haven't found a language reference yet. edit: it's statically typed ahead of time - that feels like something that needs a detailed description of what it's doing, given the baseline of like-python

I wonder if the differences will cause any real compatibility issues with existing Python libraries?

Re: Codon: A high-performance Python-like compiler using LLVM

#26
> "...typically on par with (and sometimes better than) that of C/C++"

What makes it faster than C++?

I see this in the documentation but I am not sure it helps me (not an expert):

> C++? Codon often generates the same code as an equivalent C or C++ program. Codon can sometimes generate better code than C/C++ compilers for a variety of reasons, such as better container implementations, the fact that Codon does not use object files and inlines all library code, or Codon-specific compiler optimizations that are not performed with C or C++.

Re: Codon: A high-performance Python-like compiler using LLVM

#29
post #18

Unfortunately stuff like this never makes it to the upstream. And i am afraid to ask why. We had pypy for years, but never got merged with python. That is why there are still minor incompatibilities between pypy and "The Python", so it's not that useful as it might have been if it got merged with cpython at some point.

I got a massive jump in performance when moving from Python 3.8 to 3.10 (over some function call optimizations I think, based on the project). And 3.11 got even better (up to 50% faster on special cases, and 10~15% on average) with respect to 3.10. Python 3.12 is already getting even more speedups and a there's a lot more down the road[0].

But Python core developers value keeping "not breaking anyones code" (Python 3 itself was a huge trip on that aspect and they're not making that mistake again), that's why things may seem slow on their end. But work is being done, and the results are there if you benchmark things.

[0] See https://github.com/faster-cpython/ideas/blob/main/FasterCPyt... however that's over a year old already and I'm sure I've read/heard more specifics

Re: Codon: A high-performance Python-like compiler using LLVM

#30

> "...typically on par with (and sometimes better than) that of C/C++" What makes it faster than C++? I see this in the documentation but I am not sure it helps me (not an expert): > C++? Codon often generates the same code as an equivalent C or C++ program. Codon can sometimes generate better code than C/C++ compilers for a variety of reasons, such as better container implementations, the fact that Codon does not us…

JIT.
Post reply on HN