Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I honestly don't know why it's not such a big deal for Lua, but given LuaJIT's performance, and knowing that it doesn't do escape analysis I know it must not be a big deal :) In Python it's a big deal because everything is boxed, and your inner loops just get bogged down with allocations, which are expensive compared to arithmetic operations.


It's not a big deal for LuaJIT because it uses a clever tagging format that can hold a boxed 64-bit float in a register.


LuaJIT being a trace compiler, escape analysis in implicit. As long as a value stays (say) int or float, the code to handle it stays int or float. If for whatever reason it switches type, the code will change to accommodate that -- but as long as the types (and/or values) stay the same, the machine code to handle them will take advantage of that.


It's absolutely not true that escape analysis is implicit in tracing: https://bitbucket.org/pypy/extradoc/raw/63e4617062b2/talk/pe...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: