[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: closure vs metatable speed & memory use
- From: Mike Pall <mikelu-1011@...>
- Date: Fri, 26 Nov 2010 18:27:51 +0100
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 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.
Umm ... and it may be wise to become familiar with a language
before writing and publishing benchmark comparisons for it. ;-)
--Mike