lua-users home
lua-l archive

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

On Thursday, November 28, 2013, Luiz Henrique de Figueiredo wrote:
> The math library is the one that I end up wrapping/patching/extending the
> most. Much of that would not happen at all, if it were written in Lua,
> because Lua will use metamethods and the efficiency that you are gaining
> from the C implementation comes mostly from this loss in flexibility.

Are you really proposing implementing sin, cos, etc in Lua?

That is the opposite of what I meant. The speed of C comes from avoiding code that brings value. This is the trade off, not because C is so different. And that tradeoff doesn't seem to have been arbitrarily made, to me.