HackerTrans
TopNewTrendsCommentsPastAskShowJobs

arshajii

no profile record

Submissions

[untitled]

1 points·by arshajii·năm ngoái·0 comments

Accelerating Python & NumPy up to 900x with Codon

exaloop.io
3 points·by arshajii·năm ngoái·1 comments

New accelerated NumPy implementation for Codon, now open source

exaloop.io
2 points·by arshajii·năm ngoái·0 comments

Mapping Python to LLVM

blog.exaloop.io
121 points·by arshajii·4 năm trước·32 comments

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

github.com
317 points·by arshajii·4 năm trước·179 comments

comments

arshajii
·4 năm trước·discuss
Thanks a lot for all the comments and feedback! Wanted to add a couple points/clarifications:

- Codon is a completely standalone (from CPython) compiler that was started with the goal of statically compiling as much Python code as possible, particularly for scientific computing use cases. We're working on closing the gap further both in what we can statically compile, and by automatically falling back to CPython in cases we can't handle. Some of the examples brought up here are actually in the process of being supported via e.g. union types, which we just added (https://docs.exaloop.io/codon/general/releases).

- You can actually use any plain Python library in Codon (TensorFlow, matplotlib, etc.) — see https://docs.exaloop.io/codon/interoperability/python. The library code will run through Python though, and won't be compiled by Codon. (We are working on a Codon-native NumPy implementation with NumPy-specific compiler optimizations, and might do the same for other popular libraries.)

- We already use Codon and its compiler/DSL framework to build quite a few high-performance scientific DSLs. For example, Seq for bioinformatics (the original motivation for Codon), and others are coming out soon.

Hope you're able to give Codon a try and looking forward to further feedback and suggestions!
arshajii
·4 năm trước·discuss
I would guess the bulk of the time is being spent in compilation. You might try "codon build -release day_2.py" then "time ./day_2" to measure just runtime.
arshajii
·4 năm trước·discuss
Some info on that at https://docs.exaloop.io/codon/general/faq#how-does-codon-com......
arshajii
·4 năm trước·discuss
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
arshajii
·5 năm trước·discuss
We haven't done too many comparisons with BioJulia since that paper, although we did address the (valid) issues they raised such as data validation (i.e. Seq now validates input data by default, but this can be optionally disabled). We did compare against them in our last paper in a sequence alignment benchmark: https://www.nature.com/articles/s41587-021-00985-6 (check the supplement).
arshajii
·5 năm trước·discuss
(I'm one of the developers on Seq.) We've actually been working mostly on closing the gap with Python for the last year or so. Seq can be useful for plain Python programs as well -- I give a bit more context in my comment above.
arshajii
·5 năm trước·discuss
Hi everyone, I’m one of the developers on the Seq project — I was delighted to see it posted here! We started this project with a focus on bioinformatics, but since then we’ve added a lot of language features/libraries that have closed the gap with Python by a decent margin, and Seq today can be useful in other areas or even for general Python programs (although there are still limitations of course). We’re in the process of creating an extensible / plugin-able Python compiler based on Seq that allow for other domain-extensions. The upcoming release also has some neat features like OpenMP integration (e.g. “@par(num_threads=10) for i in range(N): …” will run the loop with 10 threads). Happy to answer any questions!