[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Splitting string and userdata headers from their data
- From: Jamie Webb <j@...>
- Date: Tue, 14 Sep 2004 01:00:16 +0100
On Mon, Sep 13, 2004 at 08:41:36AM -0700, Mark Hamburg wrote:
> 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.
Are you sure? Unlike something like the Boehm collector, Lua never
needs to scan through raw data to find pointers; it knows where they
all are.
> 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
> metamethod.
How would that be different to storing a pointer in the userdata?
-- Jamie Webb