lua-users home
lua-l archive

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


Remember that it is easy to combine several different benchmarks in a
single script, you just have to put each one in a do .. end block and
time the whole thing.

I have several variations of the Richards benchmark
(http://labs.oracle.com/people/mario/java_benchmarking/richards/richards.html),
you can download them from

http://www.dcc.ufrj.br/~fabiom/richards_lua.zip

"richards_loop.lua" is the one closest to the C implementation,
"richards_oo_loop.lua" is a variat that encapsulates the state and
behavior of each process in
a Lua table, and "richards_meta.lua" puts the behavior in a metatable.
The "_tail" variats use tail calls for passing control from one
process to another instead of a dispatch loop, and the "_cache" variat
caches metatable access.

Mike Pall has written a Lua version of scimark (http://math.nist.gov/scimark2/):

http://luajit.org/download/scimark.lua

The WoW Lua community has pure Lua implementations of non-trivial
algorithms, as they cannot use C extensions. If you ping Jim Whitehead
I think he can point you in the right direction.

--
Fabio Mascarenhas


On Thu, Apr 14, 2011 at 9:25 PM, Alexander Gladysh <agladysh@gmail.com> wrote:
> Hi, list!
>
> I do realize that ideal version of what I'm asking for does not exist
> (and the question itself may be not quite correct). But I will settle
> for any good enough surrogate.
>
> For illustrative reasons I need a Lua VM benchmark script (note: not a
> benchmarking tool, but a script).
>
> It should "measure" (anyhow) "overall" Lua VM performance. The idea is
> to take this script and run it on a single machine using different
> VMs: classic Lua, LuaJIT 1, LuaJIT2, Kahlua (and other java
> implementations), LuaAlchemy etc. and then compare "scores" or "times"
> or whatever. (Ah, yes: the benchmark must make at least some sense for
> LuaJIT2, it should not be of "infinite loop in 10 seconds" kind :-) )
>
> The benchmark should be small and self-contained in a single Lua
> script. It should not take too long to run even on a slowest Lua
> implementations (up to a minute or two).
>
> To clarify: I'm willing to trade benchmark accuracy and scientific
> value for illustrative qualities and relatively small size.
>
> Any hints?
>
> Alexander.
>
>