Better HN
topnewbestaskshowjobs
Log inSign up

arshajii

283 karma · joined Jan 1, 2018 (8y ago) · 13 submissions

Submissions

1.

Compiler-optimized Unicode in Codon 0.20(exaloop.io ↗)

2 points · by arshajii · 2mo ago · discuss

2.

Accelerating Python & NumPy up to 900x with Codon(exaloop.io ↗)

3 points · by arshajii · 1y ago · 1 comment

3.

New accelerated NumPy implementation for Codon, now open source(exaloop.io ↗)

2 points · by arshajii · 1y ago · discuss

4.

Mapping Python to LLVM(blog.exaloop.io ↗)

121 points · by arshajii · 3y ago · 32 comments

comment 3y ago · link · parent

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!

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

Some info on that at https://docs.exaloop.io/codon/general/faq#how-does-codon-com......

comment 3y ago · link · parent

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

9.

Codon: A high-performance Python-like compiler using LLVM(github.com ↗)

317 points · by arshajii · 3y ago · 179 comments

comment 5y ago · link · parent

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).

comment 5y ago · link · parent

(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.

comment 5y ago · link · parent

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!