lua-users home
lua-l archive

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

On Wed, Aug 31, 2011 at 12:50, Lorenzo Donati
<> wrote:
> On 31/08/2011 10.17, Alexander Gladysh wrote:
>> On Wed, Aug 31, 2011 at 11:03, Lorenzo Donati
>> <>  wrote:

>>> 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.

> Do you mean that floor and ceil are really slower?

C function calls are, when compared with VM instruction execution.

You may find this helpful:

Also, read output of luac -l yourscript.lua

This doc may help with reading: