lua-users home
lua-l archive

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


On Thu, 25 Sep 2008, Mike Pall wrote:
>
> Apparently the call overhead for floor() is the main factor here
> because the '%' operator also uses floor() (the inlined C library
> function).

It is usually not inlined. As far as I can tell this is because it has
caused too many optimizer bugs in the past. The implementation uses really
nasty fiddling of the FP rounding mode - it's surprisingly non-trivial.

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
ROCKALL MALIN HEBRIDES: SOUTHERLY 5 TO 7, INCREASING GALE 8, PERHAPS SEVERE
GALE 9, LATER IN ROCKALL AND HEBRIDES. MODERATE OR ROUGH, INCREASING VERY
ROUGH OR HIGH LATER IN ROCKALL AND HEBRIDES. OCCASIONAL RAIN. MODERATE OR
GOOD, OCCASIONALLY POOR IN ROCKALL AND HEBRIDES.