From 6523585c66c04cea54df50013df8886b589847d8 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 23 Jan 2012 23:36:30 +1000 Subject: Add luaproc and LuaJIT libraries. Two versions of LuaJIT, the stable release, and the dev version. Try the dev version first, until ih fails badly. --- .../LuaJIT-1.1.7/jitdoc/luajit_performance.html | 394 +++++++++++++++++++++ 1 file changed, 394 insertions(+) create mode 100644 libraries/LuaJIT-1.1.7/jitdoc/luajit_performance.html (limited to 'libraries/LuaJIT-1.1.7/jitdoc/luajit_performance.html') diff --git a/libraries/LuaJIT-1.1.7/jitdoc/luajit_performance.html b/libraries/LuaJIT-1.1.7/jitdoc/luajit_performance.html new file mode 100644 index 0000000..7f2307c --- /dev/null +++ b/libraries/LuaJIT-1.1.7/jitdoc/luajit_performance.html @@ -0,0 +1,394 @@ + + + +LuaJIT Performance + + + + + + + + + +
+Lua +
+ + +
+

+Here are some performance measurements, based on a few benchmarks. +

+

+LuaJIT 2.0 is available with much improved performance!
+Please check the new +» interactive performance comparison. +

+ +

Interpreting the Results

+

+As is always the case with benchmarks, care must be taken to +interpret the results: +

+

+First, the standard Lua interpreter is already very fast. +It's commonly the fastest of it's class (interpreters) in the +» Great Computer Language Shootout. +Only true machine code compilers get a better overall score. +

+

+Any performance improvements due to LuaJIT can only be incremental. +You can't expect a speedup of 50x if the fastest compiled language +is only 5x faster than interpreted Lua in a particular benchmark. +LuaJIT can't do miracles. +

+

+Also please note that most of the benchmarks below are not +trivial micro-benchmarks, which are often cited with marvelous numbers. +Micro-benchmarks do not realistically model the performance gains you +can expect in your own programs. +

+

+It's easy to make up a few one-liners like:
+  local function f(...) end; for i=1,1e7 do f() end
+This is more than 30x faster with LuaJIT. But you won't find +this in a real-world program. +

+ +

Measurement Methods

+

+All measurements have been taken on a Pentium III 1.139 GHz +running Linux 2.6. Both Lua and LuaJIT have been compiled with +GCC 3.3.6 with -O3 -fomit-frame-pointer. +You'll definitely get different results on different machines or +with different C compiler options. * +

+

+The base for the comparison are the user CPU times as reported by +/usr/bin/time. The runtime of each benchmark is parametrized +and has been adjusted to minimize the variation between several runs. +The ratio between the times for LuaJIT and Lua gives the speedup. +Only this number is shown because it's less dependent on a specific system. +

+

+E.g. a speedup of 6.74 means the same benchmark runs almost 7 times +faster with luajit -O than with standard Lua (or with +-j off). Your mileage may vary. +

+

+* Yes, LuaJIT relies on quite a bit of the Lua core infrastructure +like table and string handling. All of this is written in C and +should be compiled with full optimization turned on, or performance +will suffer. +

+ +

Comparing Lua to LuaJIT

+

+Here is a comparison using the current benchmark collection of the +» Great Computer Language Shootout (as of 3/2006): +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BenchmarkSpeedup +-----1x----2x----3x----4x----5x----6x----7x----8x +
mandelbrot6.74========================================
recursive6.64========================================
fannkuch5.37================================
chameneos5.08==============================
nsievebits5.05==============================
pidigits4.94==============================
nbody4.63============================
spectralnorm4.59============================
cheapconcr4.46===========================
partialsums3.73======================
fasta2.68================
cheapconcw2.52===============
nsieve1.95============
revcomp1.92============
knucleotide1.59==========
binarytrees1.52=========
sumfile1.27========
regexdna1.01======
+
+

+Note that many of these benchmarks have changed over time (both spec +and code). Benchmark results shown in previous versions of LuaJIT +are not directly comparable. The next section compares different +versions with the current set of benchmarks. +

+ +

Comparing LuaJIT Versions

+

+This shows the improvements between the following versions: +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BenchmarkSpeedup +-----1x----2x----3x----4x----5x----6x----7x----8x +
fannkuch3.96 → 5.37========================########
chameneos2.25 → 5.08==============################
nsievebits2.90 → 5.05=================#############
pidigits3.58 → 4.94=====================#########
nbody4.16 → 4.63=========================###
cheapconcr1.46 → 4.46=========##################
partialsums1.71 → 3.73==========############
fasta2.37 → 2.68==============##
cheapconcw1.27 → 2.52========#######
revcomp1.45 → 1.92=========###
knucleotide1.32 → 1.59========##
+
+

+All other benchmarks show only minor performance differences. +

+ +

Summary

+

+These results should give you an idea about what speedup +you can expect depending on the nature of your Lua code: +

+ +

+The best idea is of course to benchmark your own applications. +Please report any interesting results you may find. Thank you! +

+
+
+ + + -- cgit v1.1