Lua 5.1’s edge over Javascript and Python is that it’s a lot smaller and simpler.
[1] It’s possible to recompile Lua 5.1 to have the numeric data type be an int, but the standard compiles of Lua5.1 only have double precision floats for numbers. Bitwise operators are technically not part of Lua 5.1, but a library to add support is easy and is usually done: Most Lua5.1 forks including LuaJIT and MediaWiki’s version of Lua5.1 have such a library available. Later versions of Lua have both int and float support.
[–] ajross 14 hours ago
[–] Dylan16807 6 hours ago
The point of those comments is not to hype Lua, it's to show what a JIT can do.
The idea is that a python JIT could be just as good as Lua for the parts that aren't suited to numba.
> Lua is absolutely not faster than numba, nor will it ever be (absent a numba-like translation layer) and repeatedly trying to argue so is very much missing the point.
Nobody is arguing that. People are agreeing that numba is fast, but they also want other non-number-crunching things to be fast. It's "yes, and". They're not missing the numba point, they're agreeing and you're missing the additional point they're responding with.
Yeah, but again you don't reach for C when you have a string or hash-based logic problem, which is the reason that other platforms are favored. You reach for Python[1] to solve those problems, and it works fine.
You reach for C when you care about cache footprint or memory layout. You reach for C when you need SIMD parallelism. You reach for C when you care about doing the math in single precision or 32 bit integers and will handle the precision worries yourself.
You emphatically don't reach for python (or Lua) in those situations. But notably you can reach for numba, and implement your small core of performance code in python next to the other logic you already have. And there's value there.
Screaming about using Lua instead is just nonresponsive. Lua is arguably better at performance code than Python. Lua is absolutely not faster than numba, nor will it ever be (absent a numba-like translation layer) and repeatedly trying to argue so is very much missing the point.
[1] Or fine, Lua or JS or whatever. But I'm trying deeply not to let this turn into a frothing language flame, and this is after all a python discussion.