2 ms·
LuaJIT recently gained an x86 instruction length decoder. Check it out: https://github.com/LuaJIT/LuaJIT/commit/73680a5fc760cb39760e4bbfce1166ce75de237f https:/
by daurnimator 10y ago
LuaJIT recently gained an x86 instruction length decoder. Check it out: https://github.com/LuaJIT/LuaJIT/commit/73680a5fc760cb39760e4bbfce1166ce75de237f https://github.com/LuaJIT/LuaJIT/commit/73680a5fc760cb39760e...
- versteegen 10y agoWow, I'm surprised that that's faster than the old byte-wise scanning of the instruction stream, and doubly surprised if the benefit isn't negated by the extra cache pollution. Actually, it's a lot simpler than I expected!
- daurnimator 10y agoIt's probably not; but it does fix a bug where bytes got misinterpreted. See http://www.freelists.org/post/luajit/Random-failures-in-compiled-code http://www.freelists.org/post/luajit/Random-failures-in-comp...
- versteegen 10y agoI should have thought of that... of course it's easy to see the code was probably wrong in hindsight. Thanks for the explanation.