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.
Codon: A high-performance Python-like compiler using LLVM
31–40 of 184 posts
Re: Codon: A high-performance Python-like compiler using LLVM
#32Unfortunately 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.
Re: Codon: A high-performance Python-like compiler using LLVM
#33Unfortunately 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…
Re: Codon: A high-performance Python-like compiler using LLVM
#34EDIT: A list of differences here: https://docs.exaloop.io/codon/general/differences
The summary minimizes with "many Python programs will work with few if any modifications", but it actually looks like a substantially different language.
Re: Codon: A high-performance Python-like compiler using LLVM
#35Earlier 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.
”company” is not a particularly well-defined term.
Re: Codon: A high-performance Python-like compiler using LLVM
#36> "...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.
> While Codon does offer a JIT decorator similar to Numba's, Codon is in general an ahead-of-time compiler that compiles end-to-end programs to native code.
Re: Codon: A high-performance Python-like compiler using LLVM
#37Earlier quoted context omitted.
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
#38Unfortunately 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.
It's not like you can just "merge" pypy into python, they are totally different implementations. CPython is written in C and PyPy is written in RPython which is a subset of the python language that gets compiled, into into an interpreter with JIT support. You can actually write an interpreter for any language using RPython and their toolset, for example Ruby https://github.com/topazproject/topaz
Re: Codon: A high-performance Python-like compiler using LLVM
#39Earlier quoted context omitted.
Their benchmarks ( https://exaloop.io/benchmarks ) show that Codon is much, much faster than pypy. I also just tried some microbenchmarks with their fib example (iterated many times with higher parameters) and got similar results. It's unfortunate for now that this isn't open source, but it's really valuable to demonstrate to us Python lovers what's possible using LLVM!
Their benchmarks are not to be trusted (after reading the source). - They cheat, they rewrite code to use coden specific features to "win" (ie, parallelization and GPU optimizations) - They don't warm up. They are simply running their competition directly rather than allowing any sort of warmup. (In other words, they are measuring cold boot and startup time) Now, if they want to argue about startup time or whatever m…
Re: Codon: A high-performance Python-like compiler using LLVM
#40Can we change the title to say Python-like or something similar? Based on the comments so far, it seems that the detail that it compiles its own Python-inspired language, not actual Python, is lost on many. EDIT: A list of differences here: https://docs.exaloop.io/codon/general/differences The summary minimizes with "many Python programs will work with few if any modifications", but it actually looks like a substanti…