[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: LuaJIT performance on the Simplex Method
- From: Geoff Leyland <geoff_leyland@...>
- Date: Tue, 23 Aug 2011 13:24:25 +1200
A while ago I decided to relearn some things I've long forgotten and implemented the Revised Simplex Method  in Lua. I've now got around to implementing the exact same algorithm in C, and so can compare the performance of LuaJIT against C on workload that is, well, of interest to me, and might be of interest to others.
I ran the algorithm over a small set of netlib test problems, and the total times are:
LuaJIT without ffi: 58.8s
LuaJIT with ffi: 45.9s
gcc 4.6.0 -O2: 43.2s (O3 and -ftree-vectorize didn't seem to make it faster)
LuaJIT vs Lua: 50 or 64x faster
LuaJIT vs C: 6% slower
Only 6% slower than C is pretty impressive.
If anyone's interested the code is at . The algorithm I've implemented is not in any way a modern version of the simplex method, so please don't use it to solve any LPs.