lua-users home
lua-l archive

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


Storage allocation can be very expensive. You may want to look at whether
you are allocating lots of temporary objects and whether there are ways to
replace those with multiple returns or with recycled objects.

Object recycling can be done, for example, by using the insert and remove
operations to treat a table as a stack of extra objects. Don't forget to
cache table.insert and table.remove in local variables!

Mark