lua-users home
lua-l archive

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

Do you plan to be able to specify the return type(s) of functions? It wouldn't always be possible with the dynamic nature of Lua functions, but if a function always returned the same number/types of data, it could eliminate some runtime checks.

On Sun, May 24, 2015 at 5:59 PM, Dibyendu Majumdar <> wrote:

I found a matrix multiplication benchmark which I adapted for Ravi.
The original benchmark is from:

C:\github\ravi\ravi-tests>\luajit\luajit.exe matmul2.lua 1000
time taken      0.968

C:\github\ravi\ravi-tests>..\build\Release\lua.exe  matmul1.ravi 1000
time taken      4.2

C:\github\ravi\ravi-tests>\lua-5.3.0\src\build\Release\lua.exe matmul1.lua 1000
time taken      34.604

The Ravi version uses array slices that I have been playing around
with. The idea is to allow more efficient [] operator access.

For the source code for above benchmarks see:

For a full list of benchmarks and Ravi's performance at present, please see:


Brigham Toskin