lua-users home
lua-l archive

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


llvm-lua is a Lua JIT/static compiler that uses LLVM on the backend to convert 
Lua bytecode into machine code for faster execution.  Using LLVM gives Lua 
JIT support on cpu architectures other then x86.

This new version is a major refactor/cleanup of the code from the 0.2 release.
Improvements to this version are:
* True tail-call support, previous versions handled tail-calls like normal 
calls.
* Numeric 'for' loops have new optimizations that move the internal index onto 
the c-stack (this allows LLVM to move the index to a cpu register).
* Number constants for a few opcodes(add/sub/mul/div/pow + for loops) have 
been inlined as LLVM constants.
* Fixed 32bit support for static compiling Lua scripts.
* Exposed LLVM command-line options.

The code can be downloaded from the project's website:
http://code.google.com/p/llvm-lua/

-- 
Robert G. Jakabosky
script        lua      llvm-lua  native   luajit   
ackermann     2.11     2.20      2.13     0.38     
ary           1.03     0.49      0.53     0.26     
binarytrees   1.64     1.55      1.31     0.96     
chameneos     1.11     0.64      0.56     0.23     
except        1.15     1.03      0.84     0.50     
fannkuch      1.40     0.63      0.57     0.29     
fibo          0.84     0.47      0.44     0.13     
harmonic      1.28     0.28      0.26     0.23     
hash          1.08     0.92      0.89     0.85     
hash2         1.06     0.86      0.83     0.49     
heapsort      1.11     0.50      0.44     0.25     
hello         0.00     0.01      0.00     0.00     
knucleotide   0.66     0.61      0.54     0.45     
lists         1.05     0.74      0.63     0.43     
matrix        1.06     0.53      0.49     0.29     
meteor        1.35     1.53      1.33     0.47     
methcall      1.19     0.71      0.66     0.45     
moments       0.93     0.79      0.69     0.86     
nbody         1.04     0.63      0.44     0.24     
nestedloop    1.06     0.21      0.17     0.16     
nsieve        1.13     0.80      0.75     0.57     
nsievebits    1.39     0.59      0.73     0.22     
objinst       1.00     0.89      1.04     0.76     
partialsums   0.99     0.67      0.58     0.30     
pidigits      1.23     1.26      1.16     0.56     
process       0.00     0.76      0.87     0.81     
prodcons      1.01     0.61      0.58     0.29     
random        1.08     0.62      0.39     0.22     
recursive     1.28     0.81      0.64     0.16     
regexdna      0.98     0.99      0.95     1.06     
regexmatch    0.26     0.33      0.24     0.29     
revcomp       0.36     0.40      0.35     0.24     
reversefile   0.46     0.38      0.36     0.41     
sieve         1.03     0.49      0.42     0.28     
spectralnorm  1.23     0.65      0.49     0.26     
spellcheck    0.76     0.69      0.67     0.68     
strcat        0.87     0.75      0.73     0.62     
sumcol        0.76     0.75      0.78     0.97     
takfp         0.42     0.29      0.25     0.07     
wc            0.93     1.21      0.93     1.52     
wordfreq      0.70     0.71      0.59     0.71     
Total         40.02    29.98     27.25    18.92