lua-users home
lua-l archive

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

on 5/7/07 6:04 AM, Mike Pall at wrote:

> - 100-200 ns for a closure or table allocation plus collection

In looking at areas for enhancement in 5.2, I think it would be really
useful if there were a way to optimize this. In particular, it would be good
to do so when the closure or table is being passed as a parameter to another

My guess based on other profiling that I've done, is that memory allocation
and deallocation is the killer here though creating more work for the
garbage collector is probably also a problem.

What I've been thinking might be useful is some form of simple escape
analysis -- possibly purely runtime -- that would detect values that don't
develop roots outside the stack in which they are allocated and collect
those more rapidly. This could then be coupled with maintaining a free list
at the Lua universe level which would be able to bypass any thread safety
protections in malloc and free.