lua-users home
lua-l archive

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

> Does this mean that if we don't pay attention to this new behaviour
> we could get worse performance than Lua 5.2/5.1 or the only drawback
> is simply that we wouldn't gain any performance boost from the new
> int arithmetic? May existing scripts exhibit worse performance in
> 5.3?

That depends *a lot* on your architecture. My machine is an old Pentium
32 bits, which is famous for its slowness in converting floats to ints.
Even here, I got this performance hit in only one case, which is easily
found by looking for uses of 'floor' in your code. In that particular
case, the next line was enough to solve the problem:

  local floor = math.ifloor or math.floor

-- Roberto