|
this is fantastic, thanks! it seems like you're saying pallene is using a c compiler as its compiler backend? that seems like it could give you a big leg up on difficult optimizations like inlining recursion (compared to writing your own backend, i mean, not specifically compared to luajit) i'll read the paper. aha, it says: > The Pallene compiler generates C source code and uses a conventional C compiler as a backend. This
is simple to implement and is also useful for portability. The generated C code for a Pallene module is
standard C code that uses the same headers and system calls that the reference Lua does. This means that
Pallene code should be portable to any platforms where Lua itself can run. btw, if you're not on a microcontroller, this can even be a feasible thing to do for a jit compiler; running gcc 9.4 on a small program takes about 70 milliseconds on this micropc, 55 milliseconds to compile a small shared library. clang is of course less practical, but older gcc versions were even better, and tcc is even better, taking respectively 10ms and 7ms. you might have to cut down your header files though the paper also has a longer section comparing pallene with luajit, which i will have to read in more detail. thank you very much for linking it! 5.4 vs. 5.1 could be an advantage for either side; minetest, for example, uses 5.1, so luajit is an option and pallene probably isn't |