LuLu : Lua VM On Lua

>> Project Page, >> Japanese Page


Download

What's This?

LuLu is a Lua 5.1 VM implementation in Lua language itself.
It aims to be a concise, easily readable, and customizable LuaVM implemantation.

LuLu is originally written as the material for the blog series "Reading Lua VM".

Currently, LuLu consists of the interpreter of virtual machine instructions + the coroutine library. The implmentation of datatypes (strings, tables, etc) and most of the standard library functions are simply reusing the implementation of the host Lua environment.

Supported Features

Currently Unsupported Features

Performance Memo

Performance is not my first concern, so do not expect anything on it... :P

"Lua (C impl.)" vs "LuLu (Lua impl.)"

> lua test/fib.lua 24
        n       value   time    evals
plain   24      46368   0.05    150049
cached  24      46368   0       25

> lua lulu.lua test/fib.lua 24
        n       value   time    evals
plain   24      46368   6.088   150049
cached  24      46368   0       25

"LuLu" vs "LuLu on LuLu"

> lua lulu.lua test/fib.lua 18
        n       value   time    evals
plain   18      2584    0.49    8361
cached  18      2584    0.01    19

> lua lulu.lua lulu.lua test/fib.lua 18
        n       value   time    evals
plain   18      2584    30.013  8361
cached  18      2584    0.181   19

hzkr <binhzkr _a_t_ gmail _d_o_t_ com>