lua-users home
lua-l archive

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

(Philippe Lhoste mentioned this in a recent message):

These two are not as exclusive as you might think, although you're unlikely
to gain much speed over simply using GNU C extensions plus some sort of
threaded code (the sort of thing that GNU Forth does, which Anton Ertl has
documented extensively at

However, if you still want to write assembly code, you can use a system such
as GNU Lightning (,
which lets you generate fast code at run-time in a portable manner (you
could use this to translate Lua directly to executable code, though again, I
don't think this will give much of a speed gain), or something like my Mite
system ( to generate portable
assembly code at compile-time that can be assembled at run-time (although my
system does not currently allow run-time linking of mixed C/Mite binaries,
and only works on ARM processors).

I'm working on a simpler version of Mite which could be used to do precisely
what you want: hand-code bits of portable assembler which could then be
assembled into portable object files and linked at run-time using a JIT
compiler. I am currently working on a pure ANSI C interpreter, so you'd be
able to retain full portability too, albeit at the expense of speed compared
with the current system.

Does any of this sound interesting?

-- | violence, n.  bravery for cowards