lua-users home
lua-l archive

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


>> #4: split LuaJIT tasks to separate processes
> 
> What about the suggestion to move some data to lightuserdata? Wouldn't
> that improve memory allocation on LuaJIT side?

Well, that is fair enough when the hosting process is aware of what is going on inside Lua states. This would benefit if we had objects living in lightuserdata buffers and providing Lua with "methods" to work with them.

In my case, LuaJIT is a scripting engine which is wrapped around with low-level code that deals with networking and disk I/O, data (de)serializing, client and control requests, RPCs, etc. To Lua, all that finally appears as native Lua calls with arguments containing native Lua objects. Generally, Lua knows nothing about where these arguments came from and where the return values go to. On the other hand, the low-level code knows nothing about what are these arguments and what happens to them as the result of the call.