lua-users home
lua-l archive

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


Patrick Rapin wrote:
> function Test()
> 	local function Internal()	
> 	end
> 	for i=0,10000000 do
> 		Internal()
> 	end
> end

You're creating a new closure for Internal() on every call. Don't
do that. LuaJIT specializes to each closure and there's a limit to
that. Create the closure outside of Test().

--Mike