lua-users home
lua-l archive

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


On Mon, 4 Jan 2021 at 20:31, Russell Haley <russ.haley@gmail.com> wrote:
>
> The difference in SLOC between LLVM and MIR is hilarious: 4.13 Million LOC vs 16,000. How big is the base Ravi install?
>

Indeed. It takes seconds to build Ravi with MIR - it used to take
several minutes to build LLVM. Also resulting binaries are small.

MIR is an unbelievable project. All small JIT backends I tried before
were very bad at optimization. MIR manages to get close to 2x gcc or
clang even with its small size and thus less features. I guess it
helps that the developer of MIR is the maintainer of gcc register
allocation.


> Have you done any benchmarking between Ravi (MIR) and LuaJIT?

No, but LuaJIT will always win in the general case, as Ravi needs type
annotations for good performance. Until I can implement function
specializations with predicted types, it will be hard to beat LuaJIT.

>
> Is it possible to just swap in Ravi where one would use Lua or are there caveats? For instance, can I run standard lua scripts and lua rocks without static types?
>

Yes but there are some caveats. I guess if you are running standard
Lua code, there is not much benefit.


Regards