From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,6d2f6f79a5d77470 X-Google-Attributes: gid1164f8,public X-Google-Thread: 110292,6d2f6f79a5d77470 X-Google-Attributes: gid110292,public X-Google-Thread: f57db,6d2f6f79a5d77470 X-Google-Attributes: gidf57db,public From: harley@pauillac.inria.fr (Robert Harley) Subject: Re: Final results of portable benchmark for single, SMP and MPP computers Date: 1997/04/15 Message-ID: <5j046v$hsq@news-rocq.inria.fr>#1/1 X-Deja-AN: 234970989 Organization: I.N.R.I.A Rocquencourt Newsgroups: comp.benchmarks,comp.sys.dec,comp.sys.intel Jeffrey Potoff writes: >Rob, > Is there any chance that you could share some of your speed secrets ? Secrets? Ahem, well there aren't any really. I suppose it just requires believing that any piece of code can be sped up and futzing around with it until you can't possibly squeeze any more out of it, then step back for a coffee break and think of another couple of tricks! Of course the first thing to do is to look for algorithmic improvements. After that you've get to give your compiler enough information to optimise the program well. A good compiler can do plenty of great stuff as long as it knows it's allowed to ;) So stick "static" in front of functions that don't need to be exported, put "const" qualifiers wherever they are valid, replace small arrays with a few variables if you can etc. Also have some idea of the workings of the chip you're targetting. On Alpha rewrite locally to try to keep two threads going and to avoid dependencies between successive expressions. For instance to double a f.p. number choose between x *= 2.0 and x += x depending on whether the multiplier or the adder is likely to be free. Replace ints by longs, reduce branches... Declare functions with stuff like this: static int Collide ( float *const*const*const*ff, [...] ); Change this: for(rho[0]=0.0,i=0; i