[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Empty functions
- From: "Adam D. Moss" <adam@...>
- Date: Sun, 29 Jun 2003 19:58:44 +0100
Tom Spilman wrote:
Quick optimization question: Does Lua skip calling empty functions?
No, I don't believe so -- since 'everything' is dynamic, it
can't know that a function is empty until the moment it's
called. (It'd probably be feasible for Lua to inline functions
and turn your empty function calls into no-ops ahead of time if
your functions were 'local' and Lua had the notion of constant
objects, but it doesn't.)
--Adam
--
Adam D. Moss . ,,^^ adam@gimp.org http://www.foxbox.org/ co:3
"When I was young, I would break down and cry whenever mom made me
throw an empty toilet paper tube in the trash can. I just imagined
it sitting at the dump, all cardboard and sad." -- T.Farnon