lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On Thu, Jan 23, 2020 at 8:25 AM Sam Putman <atmanistan@gmail.com> wrote:


On Wed, Jan 22, 2020 at 11:00 PM Eretnek Hippi Messiás <hippi777@protonmail.com> wrote:

luaffi is slowly bleeding out, its not even supported in ravi anymore (ive never checked out its sauce), luajit doesnt play nicely with the c api, and i think lua would still work better with the c api, even if luaffi would be polished...

Could you expand on what you mean by 'LuaJIT doesn't play nicely with the C API'? 

I've used several conventional C packages in LuaJIT without any problems.

cheers,
-Sam.

I imagine the issue being alluded to is that LuaJIT has to disable compilation around functions implemented using the C API. It has to entirely throw away any assumptions it can make about the Lua state because a Lua C function can do literally anything to it and the JIT has no way to know about it. If you're using Lua C functions, you're basically getting the advantages of LuaJIT's hand-tuned-asm interpreter but losing out on most of the advantage of compilation.

/s/ Adam