lua-users home
lua-l archive

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


On Wed, Aug 31, 2011 at 11:03, Lorenzo Donati
<lorenzodonatibz@interfree.it> wrote:

> I stumbled a funny result when doing very simple benchmarking on some of my
> code.

You did not say if you were using plain Lua or LuaJIT. Seems to be plain Lua.

> According to the following benchmarks, built-in math.floor and math.ceil are
> slower than their counterpart rewritten using the core % operator!

That is to be expected. C function call is relatively slow.

Alexander.