lua-users home
lua-l archive

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


I'm sorry if I am being stupid. I am not exactly arriving in Lua (been using the language for 3 years in live performances) but I still don't understand your comment.

On Fri, Nov 26, 2010 at 6:27 PM, Mike Pall <mikelu-1011@mike.de> wrote:
Gaspard Bucher wrote:
> I just tested with luajit2 beta5.
>
> Tests results on: http://rubyk.org/en/post313.html

Oh well ... you've mixed up the results: the metatable variant is
definitely faster with LuaJIT.

The metatable variant takes 341ms to run with LuaJit when it takes 1319ms with Lua. Is this not "faster" enough ?
 
The closure variant is not compiled
and running in the interpreter. But your benchmark is not very
meaningful anyway, since the compiler turns the metatable variant
into a mostly empty loop. Also, measurements in the millisecond
range are too imprecise.

If it turns the metatable into an empty loop, why does it take longer then the closure version ?
 

Umm ... and it may be wise to become familiar with a language
before writing and publishing benchmark comparisons for it. ;-)

--Mike

I'm sorry if I'm being stupid but I feel even more dumb not understanding why and what I did wrong... Can you be more precise ?

Thanks for any help.

Gaspard