lua-users home
lua-l archive

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


On 20 Feb 2008 17:23:22 -0500, John D. Ramsdell <ramsdell@mitre.org> wrote:
> Leo, I haven't performed any measurements, however, it would be very
>  easy to do so, as I have a version of Lua 5.1.3 that has been patched
>  with the "Go Long Lua" patch already on my machine.  Is there a
>  standard numerical Lua benchmark or group of benchmarks that people
>  use when assessing Lua performance?  You have made me so curious right
>  now.

Since what you want is to see the performance differential between
lua_Number being "long int" versus "double", you can use a very simple
numeric loops like the following

local sum=0
for x=1,10000000 do
    sum= sum+ 100/50
end

to test it out.

Hope it helps. Also, please, keep in mind that the performance
trade-offs of an emulator (VM+hypervisor)  can be very different from
the actual hardware.

--Leo--