lua-users home
lua-l archive

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

Have any performance tests ever been done on storing string data and
userdata in separate memory blocks from the headers? The benefit of doing so
would be faster GC time since pointer-free memory wouldn't need to be
accessed. The downside would be slightly slower access to the data
structures themselves and the space for a pointer. I'm assuming that space
issues associated with doing two memory allocations instead of one could be
addressed via a suballocator for the fixed size portions.

This would also make it possible to create userdata objects that managed
pointers they didn't allocate and shouldn't free except via the __gc