4 ms·
Just use julia instead!
by jebej 8y ago
Just use julia instead!
- goatlover 8y agoThis. 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.
- auntienomen 8y agoCython basically lets you sprinkle types and performance into your Python code, as needed. It's not as drastic a departure as switching languages.
- ssivark 8y agoThere'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 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-werent-numpy-scipy-numba-good-enough/2236 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.
- jzwinck 8y ago> 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.
- auntienomen 8y agoThe 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.
- ChrisRackauckas 8y agoIt offers a ton that you don't get from Cython: http://www.stochasticlifestyle.com/why-numba-and-cython-are-not-substitutes-for-julia/ http://www.stochasticlifestyle.com/why-numba-and-cython-are-...
- f311a 8y agoJulia lacks ecosystem outside of academic stuff.
- cultus 8y agoIt's quite complete for anything numerical/machine learning/statistical at this point, with almost 2000 packages. This is in addition to the very comprehensive standard library, which includes everything you get in Numpy/Scipy. Of course, outside of numerics, you're pretty much out of luck, which is not the case for Python. It also has multiple dispatch like Common Lisp, as well as gradual typing. All functions are multimethods, actually. This is an enormous abstraction advantage over Python. It's much easier to do complicated things without pulling your hair out in comparison to Python. I use it a fair amount in my job as a data scientist. It's also what I reach for if I need to write some custom algorithm myself that needs to be high performance, rather than doing it in C.
- f311a 8y agoDoes it have a tooling for deployment? Is there a good way to deploy a machine learning model in production?
- jhayward 8y agoI don't find Julia to be nearly as programmer-friendly as Python, with more syntax and more cognitive overhead. This is on an admittedly small experience base.