lua-users home
lua-l archive

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


On 09/02/2014 01:57 PM, Roberto Ierusalimschy wrote:
    [...]

where if lua_pushx would return 1, the then possible source code

    return lua_pushx (L, xxx)

often times would be compiled to just:

    jump lua_pushx


So there would actually be a small technical benefit.

If you really want to go to this level (which I think is pure
speculation), you should consider also the cost of all useless
"mov $1, %eax" inside those 'lua_pushinteger' not used in returns
(paid by all compilers) :-)

Did you try or do you speculate I'm just speculating?

This would go along with establishing the "return lua_pushsomething(..."
as an idiom in order reap these benefits.

They are of at least the same significance as those that at one point
made you start writing

   return luaL_error(...)

http://lua-users.org/lists/lua-l/2013-02/msg00463.html