lua-users home
lua-l archive

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

> As you say, it depends on solution. A good C compiler should optimise
> out blocks that are never entered (if (0)..) but Lua doesnt - I think. If
> did this may be an acceptable solution but the size of the code
> generated and the speed hit of all the "if nil" tests is unacceptable.

The extra bytecode size may be an issue in some situations, but maybe we
could look forward to some simple compiler optimizations in this area?  In
any case I really don't think a few "if nil's" per source file are going to
affect any script's speed... it's negligible compared to global name lookups
and the like.

I was replying to the original question about commenting out code.
Controlling assertions is another issue.