Re: Allocation sinking in git HEAD

  • From: Adam Strzelecki <ono@xxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 4 Jul 2012 19:43:04 +0200

First of all, Mike, thank you very much for making this feature come true! On 
some tests (2x2 & 3x3 matrix operators) it gets really impressive boost.

Unfortunately it seems to bring absolutely no boost for multiplication of 4x4 
matrices (struct of 16 elements), are we running short on registers here? In 
what situation allocation sink may not trigger even we would love to?

> 0.20 GCC 4.4.3 -O2 (or -O3)
> Same speed as LuaJIT. C++ ain't so bad. ;-)

Hehe :) Well LuaJIT definitely shines there. However newer GCC like 4.7 or 
Intel C++ C 12.x have really decent auto parallelisation that can make your app 
run 3-5x faster than scalar code depending on emitted instruction set - SSE vs 

If we want to match recent C++ compilers in this matter we would need to bring 
parallelisation to LuaJIT as well, at least for 2 or more assignments in the 
row that come from same expression, i.e.:
  __mul = function(a, b)
    return vec4(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w)

Adam Strzelecki | |

Other related posts: