4 ms·
> when raw speed is required and the edit-compile-run cycle of binary extension modules is too heavy This is a compelling pitch in my opinion, but can anybody
by vegabook 11y ago
> when raw speed is required and the edit-compile-run cycle of binary extension modules is too heavy
This is a compelling pitch in my opinion, but can anybody explain to me where Lua would be better than, say, Numpy, or Numba for that matter, for computationally expensive tasks?
What are the use cases for this that well-known and really fast Python extensions do not already cater for?
- TodPunk 11y agoOff the top of my head: any time you want to run a computational thing in another thread without doing something like an entire celery process or somesuch. It's not about being THE solution for such things anyway. It's about being an option.
- Houshalter 11y agoThose libraries are for doing fast matrix operations. Lua is a fast general purpose language.
- ketralnis 11y agoNumpy, is that, but Numba is a general purpose JIT: > Numba works by generating optimized machine code using the LLVM compiler infrastructure at import time, runtime, or statically (using the included pycc tool). Numba supports compilation of Python to run on either CPU or GPU hardware http://numba.pydata.org/ http://numba.pydata.org/
- srean 11y agoThe numpy analogue in lua would be torch. The community can be a little weird / insular but otherwise very interesting and full of potential
- infinite8s 11y agoTrue multicore computation (although that's possible with numba's nopython mode, but it's not as general as what luajit can support).