[Nottingham] Time

Martin martin at ml1.co.uk
Tue Jan 30 21:24:35 GMT 2007


Joshua Lock wrote:
[---]
> On 30 Jan 2007, at 18:03, Martin wrote:
>> What are you benchmarking?
>>
>> Algorithms costing or compiler optimisations or?
> 
> The relative costs of different STL containers and algorithms. I'm

I assume you must be in C++ and mean:
http://en.wikipedia.org/wiki/Standard_Template_Library

Or are you deep into some arcane Slower-Than-Light metaphysics? :-)


> thinking that having time on my side gives me an advantage over my
> Windows using brethren.

I'm sure there are some very elaborate and beautifully graphical
profiling tools in KDE... Likely way way OTT ;-)


And time for compiler options?

Some of my favourites are:

export CFLAGS='-march=athlon-4 -O3 -fexpensive-optimizations
-funroll-loops -frerun-cse-after-loop -frerun-loop-opt
-fomit-frame-pointer -fschedule-insns2 -minline-all-stringops
-mfancy-math-387 -mfp-ret-in-387 -m3dnow -msse -mfpmath=sse -mmmx
-malign-double -falign-functions=4 -fforce-addr -pipe'
export CXXFLAGS=$CFLAGS


export CFLAGS="-march=athlon-4 -O3 -funroll-loops -mfpmath=sse
-minline-all-stringops -falign-functions=4 -frerun-cse-after-loop
-frerun-loop-opt -m3dnow -malign-double -mfancy-math-387"
export CXXFLAGS=$CFLAGS


export CFLAGS="-march=athlon-4 -O3 -malign-double
-maccumulate-outgoing-args -fomit-frame-pointer -falign-functions=4
-finline-limit=1024 -fprefetch-loop-arrays -funroll-loops -fforce-addr
-ftree-vectorize -ffast-math -ftracer"
export CXXFLAGS=$CFLAGS


export CFLAGS="-march=athlon-4 -O3 -funroll-loops -mfpmath=sse
-minline-all-stringops -falign-functions=4 -frerun-cse-after-loop
-frerun-loop-opt -m3dnow -malign-double -mfancy-math-387 -mfp-ret-in-387
-pipe -fschedule-insns2 -fexpensive-optimizations"
export CXXFLAGS=$CFLAGS


export CFLAGS="-march=athlon-4 -Os -fomit-frame-pointer -pipe"
export CXXFLAGS=$CFLAGS


(All for the "athlon-4" :-) )

That last one can be surprisingly good...


Cheers,
Martin


-- 
----------------
Martin Lomas
martin at ml1.co.uk
----------------



More information about the Nottingham mailing list