3 ms·
I can't imagine that Mike Pall won't find a way to make LuaJit fast with the current Lua features, together with full 64-bit integers. Can you please elaborate
by acqq 12y ago
I can't imagine that Mike Pall won't find a way to make LuaJit fast with the current Lua features, together with full 64-bit integers.
Can you please elaborate (or give some link)?
- nickik 12y agoHe can if course make it fast, even very fast but conceptually its hard because he has focused so much work on making floating fast. He uses them as the basic element on the stack and hiddes pointers in the NaN. Ints dont have NaNs so that approche does not scale that well to more primitives. There are a range of compiler tricks that can make boxed math go fast as well.
- haberman 12y agoI asked Mike about this a while ago. Here's what he said about the challenges of it (this was a year ago, so I don't know if this represents his current thinking or not): "Using 64 bit integers all-over will definitely hurt tight loops on 32 bit machines -- narrowing number ranges is very tricky for the compiler. Also, the fact that int64_t is neither a subset nor a superset of a double is worrying. This kills various optimizations and may give surprising results even in simple mixed-type expressions."