Thank you for the tip. But if i use the -ffast-math option, the result is computed fast but result of my computation is wrong! I am using a lots of double operations and <cmath> functions. Is this a known issue? Best regards Martin -------- Original-Nachricht -------- > Datum: Mon, 20 Apr 2009 12:23:19 -0700 > Von: Ian Lance Taylor <iant@xxxxxxxxxx> > An: tprince@xxxxxxxxxxxx > CC: Martin Ettl <ettl.martin@xxxxxx>, gcc-help@xxxxxxxxxxx > Betreff: Re: What optimizaton flags should i use (g++-4.3.3,Linux,Core2Duo)? > Tim Prince <TimothyPrince@xxxxxxxxxxxxx> writes: > > > Martin Ettl wrote: > > > >> i am playing around with g++-4.3.3 on Ubuntu Linux. The project i am > working does a lot of floating point arithmetic (based on double variables). > The testplattform i use, is a intel core 2 duo processor. So what > optimization flags are good for this plattform? Currently i am using -O3 > -funroll-loops, but there are a plenty other. > >> > > If you are using the 64-bit compiler, this may be sufficient, but > > --param max-unrolled-insns=<your choice> > > or > > --param max-unroll-times=4 > > may be useful to make the unrolling less aggressive. > > > > I suppose you're not using the 32-bit compiler, where you would set > > -march=pentium-m > > or > > -march=prescott > > or some other option, to enable partial or full use of sse2. > > > > Add -msse3 if you like (either 32- or 64-bit), but you probably have no > > use for it. > > > > -fassociative-math (or, if it doesn't work, -ffast-math) are required > for > > vectorization of sum reductions. Otherwise, they may be undesirable. > > They are saner in gfortran than in g++. > > > > If you use OpenMP, of course you would set -fopenmp. > > Other options to consider are -mfpmath=sse and -ffast-math. > > Ian -- Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss für nur 17,95 Euro/mtl.!* http://dslspecial.gmx.de/freedsl-surfflat/?ac=OM.AD.PD003K11308T4569a