[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: OO call vs normal call
- From: Mark Hamburg <mhamburg@...>
- Date: Mon, 07 May 2007 08:17:22 -0700
on 5/7/07 6:04 AM, Mike Pall at mikelu-0705@mike.de 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
function.
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.
Mark