I would like to be able to call lua_newuserdata. This function makes the lua context allocate some memory and lua will take care of cleaning it up as well. Right now, in mini3d-plus, lib3d.point is a 3-tuple of floats which is malloc'd and free'd upon garbage collection. I believe this may be causing significant slowdown. One alternative I would like to try is lua_newuserdata, but there is no way to access this function as far as I am aware, as there is no way to statically nor dynamically link to the lua runtime.
P.S. A way to dynamically link to any lua runtime function would also be appreciated.