4 ms·
For numeric code, comparing to pure python makes no sense, since people use numpy+numba to do that. Is julia much much faster than numba? I don't think so :)
by longqzh 5y ago
For numeric code, comparing to pure python makes no sense, since people use numpy+numba to do that. Is julia much much faster than numba? I don't think so :)
- dnautics 5y agoyeah, then you try to use numba + scipy and then sure many things work but you're never too far away from a tableflip and wanting to curse your fucking life out.
- jolux 5y agoProbably not faster in an absolute sense but things like loops in Julia can be properly optimized and will sometimes be more readable than structuring your program entirely around NumPy constructs.
- longqzh 5y agoFor numpy, it's correct. But numba can optimize the loop. So optimized and readable loop is not an advantage of julia compare to numba.
- ChrisRackauckas 5y agoNot in real-world contexts. This is spelled out in Julia for Biologists (https://arxiv.org/abs/2109.09973 https://arxiv.org/abs/2109.09973) which does the operation counting to show why using Numba with SciPy is still an order of magnitude slower in scientific operations like solving differential equations compared to Julia. An order of magnitude on widely used scientific analyses is pretty significant!
- adgjlsfhk1 5y agoJulia is generally in the same ballpark as Numba (depending on the application they should be within 2%). The difference is that Julia is a full language, while Numba breaks if you try to use it with anything else.
- rfw300 5y agoYeah, Numba usually delivers on its performance promises when used right, but can be such a huge hassle oftentimes as to make it not really worth it.
- jjoonathan 5y agoYes, Numba is just barely less awful than managing a C build process. Julia is a much better solution to the two language problem, here's hoping it can overcome the ecosystem inertia.