News for hackers. Stuff that matters.
Re:How Numba and Cython speed up Python code by goatlover on Friday August 03, 2018 @03:50PM (#17683037)
This. If you need to drop out of regular Python for performance reasons, then Julia offers the same high level flexibility, but with types and performance.
Re:How Numba and Cython speed up Python code by auntienomen on Friday August 03, 2018 @03:56PM (#17683087)
Cython basically lets you sprinkle types and performance into your Python code, as needed. It's not as drastic a departure as switching languages.
Re:How Numba and Cython speed up Python code by ssivark on Friday August 03, 2018 @08:18PM (#17684602)
There's a reason most high-performance Python libraries are not written that way, and core routines are just written in C instead. Proof of the pudding is in the eating!

See this talk by Armin Ronacher (creator of Flask) on why the design of python makes it fundamentally unfriendly to performance optimizations: https://youtu.be/qCGofLIzX6g?t=171

Julia has be designed ground up to avoid several such problems. See this discussion: https://discourse.julialang.org/t/julia-motivation-why-weren...

If your domain falls under the umbrella of numerical and scientific computing, writing Julia is as painless as writing python, with code that automatically runs roughly as fast as C. If you're used to writing numpy, you can hit the ground running in Julia, with maybe a few hours to become comfortable with the slightly different syntax and the names of useful libraries.

Re:How Numba and Cython speed up Python code by jzwinck on Friday August 03, 2018 @08:47PM (#17684739)
> There's a reason most high-performance Python libraries are not written [with Cython], and core routines are just written in C instead.

Pandas, Scipy and lxml are large, very popular Python libraries that use Cython. The article even mentions them at the end.

Re:How Numba and Cython speed up Python code by auntienomen on Friday August 03, 2018 @11:05PM (#17685154)
The point is that Cython provides a nice intermediate stage between C and CPython. Most optimizations need the first factor of 100, not the last factor of 2. You can usually achieve that in Cython with an effort measured in characters changed rather than lines of code changed.

I've played with Julia. It's nice enough, but it doesn't offer me anything I don't already get through the C/Cython/CPython hierarchy.

Re:How Numba and Cython speed up Python code by ChrisRackauckas on Monday August 06, 2018 @12:14PM (#17698916)
It offers a ton that you don't get from Cython: http://www.stochasticlifestyle.com/why-numba-and-cython-are-...