Previously, the ... arg would create a table 'args' if called. This allocated a table into memory, and thus became a source of garbage churn. A very common pitfall of this came from hooking: local f = somefunc somefunc = function(...) -- do some crap return f(unpack(args)) end Now if this function is called often, or there are many hooks like this, there will be a significant hit on performance. With lua 5.1 we can do this hook with no memory wasted local f = somefunc somefunc = function(...) -- do some crap return f(...) end
Previously, the ... arg would create a table 'args' if called. This allocated a table into memory, and thus became a source of garbage churn. A very common pitfall of this came from hooking: local f = somefunc somefunc = function(...) -- do some crap return f(unpack(args)) end Now if this function is called often, or there are many hooks like this, there will be a significant hit on performance. With lua 5.1 we can do this hook with no memory wasted local f = somefunc somefunc = function(...) -- do some crap return f(...) end