"Kaspar Thommen" <kaspar@xxxxxx> writes: > To my surprise, the __restrict version is not faster than the conventional > one. In fact, they show the same speed. Do I have to specify any compilation > option to tell g++ to really take advantage from the __restrict information? No, although probably -O2 is required to show any difference. > Didn't find anything in the docs however. I tried using -o, -o2, > -o3, giving always equal speed for both functions. Try -funroll-loops or -funroll-all-loops, this produces more possibilities to take advantage of the non-aliasing. -- Falk