Re: Few questions about LuaJIT internals on 64 bit

  • From: Dibyendu Majumdar <mobile@xxxxxxxxxxxxxxx>
  • To: "luajit@xxxxxxxxxxxxx" <luajit@xxxxxxxxxxxxx>
  • Date: Sat, 25 Mar 2017 21:32:21 +0000

Hi Demi,

On 25 March 2017 at 21:05, Demi Obenour <demiobenour@xxxxxxxxx> wrote:

I think that Julia might come close.  It is designed to combine dynamic
typing with near-C numerical performance – and it delivers.  It uses a
different approach (abstract interpretation), but I would not be surprised
if that could be improved upon.


Julia is statically typed I believe. It uses type inference to give
the appearance of a dynamic language.

Julia's VM is also pleasingly compact – about 39k lines of C, 18k of C++, 5k
in headers and 8k of Scheme (used for the parser).  That includes a full
Scheme VM too.   So about the same as LuaJIT.  It does delegate the actual
compilation to LLVM, but Julia is designed to have rich type information
available, and that is where LLVM excels.  I don't think that includes the
type inference engine, though – I believe that is written in Julia itself
(though I could be wrong).


No implementation that is based on LLVM can be compared to LuaJIT (I
speak from experience). LuaJIT's unique achievements are not just that
it is fast, but also that its extremely small, and the JIT compilation
is extremely fast.

The size of Julia is small only if you exclude all the dependencies it has.

Regards
Dibyendu

Other related posts: