lua-users home
lua-l archive

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


Hey man! Good to know ravi is getting really warm in the oven! Regarding the changes to regular lua, I've got some questions:
Some of these questions really leap away from Lua but, curiosity usually bests me on january (and subsequent months). Cheers!

Em seg., 4 de jan. de 2021 às 23:39, Dibyendu Majumdar <mobile@majumdar.org.uk> escreveu:
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


--
"A arrogância é a arma dos fracos."

===========================
Me. Italo Moreira Campelo Maia
Co-fundador do Grupo de Usuários Python do Ceará
Secretário ForHacker (fb.com/ForHackerSpace)
Desenvolvedor Full-Stack, Escritor, Empresário, Visionário
-----------------------------------------------------
Meu Livro, Site, Blog
===========================