[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Does Lua need a JIT?
- From: Marc Balmer <marc@...>
- Date: Wed, 22 Feb 2017 16:35:06 +0100
Am 21.02.17 um 22:12 schrieb Dibyendu Majumdar:
Related to my post about why I have not used the JIT technology in
Ravi for my project (yet), is the question: do we need a JIT for Lua
I have no data points to tell me under what conditions a JIT makes
sense, apart from artificial benchmarks. The most obvious use case is
games programming I guess where the highest performance is needed, but
I am not a games programmer and do not know whether interpreted Lua is
good enough in this case.
In my opinion, having worked on Ravi and in my usage of it, Lua is not
a general purpose language that you would use to build a large scale
application. This is not because of any deficiency in Lua, it is more
that large scale development is better done in statically typed
languages like Java, C#, Go, Swift etc. The cost of developing complex
applications in a dynamic language is just too high. I know that many
folks on this list will probably disagree with this view, but leaving
aside your love for Lua and your wish to use Lua everywhere, would you
still use Lua as a general purpose application development platform?
I find that Lua is best suited in the context it was designed for - as
a light weight embedded scripting language that allows a system to
provide extensibility. Or as a scripting language for small standalone
tasks. And in these scenarios JIT technology is not always needed I
I feel that some folks use LuaJIT more as a substitute for C - i.e.
they would have coded in C but that is too hard to do, whereas LuaJIt
gives you almost similar capabilities in a much easier to use package,
so they use LuaJIT as if it is C. What do you guys think?
Apologies if this post is a more about philosophical questions related
to using Lua. I am just sharing some thoughts I have had for a while.
I see it like you. If you want speed, use C.