Hacker News new | ask | show | jobs
by jakobnissen 1887 days ago
About two years ago (before I switched from Python to Julia), I was in the same boat as you. What I concluded was:

1) Calling into an actual static language like C or Rust is the best option. You get maximal performance and all the benefits of the static language. The downside is that you need to learn another language, and manage both languages in your project, including setup and compilation of the static language etc.

2) Cython is easiest for small-scale projects, since it integrates very well with Python, and you can learn it incrementally. But I found it annoying to work with - it felt like half a language that fell between Python and a proper static language. I ended up using Cython in the end, but I wasn't happy with it.

3) Numba looks interesting and promising. At least 2 years ago, it was too brittle and had too many situations where it didn't work or didn't give noticable speedups. I'm sure they improved it since then. I would definitely take a look.

You can always just learn Julia of course and have this entire problem of "my high-level language is too slow" completely disappear ;)