|
----- Original Message ----- From: Alexander Gladysh Date: 3/19/2011 6:49 PM
Sorry, as much as I like LuaJIT2/FFI and want to use it everywhere, it simply does not exist on all the platforms I need to be. It may one day.Note that, as I see, this module accesses Lua table internals directly, and, therefore, is not compatible with LuaJIT or any other third-party Lua implementation. I would very much like to see comparison of this module performance with fine-tuned LuaJIT2/FFI implementation. (In hope that it will prove that such... unorthodox measures are... unnecessary.)
Relying on the FFI is every bit as bad, in my opinion, as accessing the table structure directly. The FFI locks you to LuaJIT in the same way that direct table internal access locks you to Lua 5.x itself.
I can't speak for the reasoning behind this converter. I can, however, state that LuaPlus accessing Lua's internals directly make it quite a bit faster than Lua's API itself. One example is here:P.S. Honestly, when I hear that something works below Lua API, I reach for a gun. Henning, not to start a holywar, but I'm very interested in the... design motivation for this.
http://lua-users.org/lists/lua-l/2011-01/msg00932.htmlNote, in particular, that the lua_fastref() code directly accesses the table internals. Note also that the design is the same as luaL_ref(), but instead of calling "heavyweight" Lua APIs, it goes straight to the source.
-Josh