lua-users home
lua-l archive

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


As a comparison, what is the time for the benchmark to run if it's coded in C?

Work I did 2-3 years ago showed between a 5x to 10x improvement when going from Lua to c.  If that holds, a C implementation would take between 2.5 and 5 seconds,  comparing very favorably with luajit and ravi

Frank

> On Dec 15, 2017, at 7:35 PM, Dibyendu Majumdar<mobile@majumdar.org.uk> wrote:
> 
> Hi,
> 
> It seems that performance of Lua is improving steadily and Ravi
> benefits from this as well.
> 
> Here are some recent test results.
> 
> Benchmark: matrix multiplication
> 
> Lua 5.3.4:  25.5 seconds
> 
> Lua (github):  18.3 seconds
> 
> ravi (computed goto): 16.6 seconds
> 
> ravi (computed goto & disabled lua hook):   15 seconds
> 
> ravi (computed goto & type annotations): 11.1 seconds
> 
> ravi (computed goto & type annotations and disabled lua hook): 10.6 seconds
> 
> luajit (v2.1 github, -j off): 9.4 seconds
> 
> 
> All are interpreter timings on 64-bit Mac OSX 10.11.6.
> 
> I believe that LuaJIT's Interpreter VM has equivalent of computed goto
> and disabled Lua hook by default - please correct me if I am mistaken.
> 
> I will share results from some other benchmarks - the trend is similar to above.
> 
> My impression is that on Mac OSX at least computed goto's are worth
> having as an option.
> 
> Regards
> Dibyendu
>