lua-users home
lua-l archive

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

I am seeing a GC stall of about 8 ms in luaC_separateudata(). After looking at the code and reading chapter 31 of Programming in Lua, I think that there simply are too many userdata objects in my lua state.

Most of these objects come from arithmetic operations on vectors (which are represented as userdata objects), so my best idea right now is to change that to a table representation, which would mean fewer userdata objects (possibly at the cost of performance).

Good news. I have changed all my userdata objects to tables and this got rid of the stall in luaC_separateudata() completely. Also, the overall performance seems to be about the same. As far as I can tell, the table representation is not much more expensive than the userdata representation

// Niklas