g++ V3.3.1 not faster with __restrict

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

 



Hi,

I ran some benchmarks using g++ V3.3.1. Two functions are called from a main
program. While both doing exactly the same array manipulation (dot product
on doubles), one of the functions uses the __restrict keyword to tell the
compiler that pointer aliasing is "turned off" in that function.

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?
Didn't find anything in the docs however. I tried using -o, -o2, -o3, giving
always equal speed for both functions.

Regards
Kaspar

-- 
GMX Weihnachts-Special: Seychellen-Traumreise zu gewinnen!

Rentier entlaufen. Finden Sie Rudolph! Als Belohnung winken
tolle Preise. http://www.gmx.net/de/cgi/specialmail/

+++ GMX - die erste Adresse für Mail, Message, More! +++


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux