This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

g++ V3.3.1 not faster with __restrict


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]