Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!think.com!paperboy!hsdndev!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Execution time bottleneck: How to speed up execution? Message-ID: <15181@smoke.brl.mil> Date: 13 Feb 91 21:15:10 GMT References: <1991Feb12.233522.5195@Think.COM> <15884.27b919a3@levels.sait.edu.au> <64745@brunix.UUCP> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 9 In article <64745@brunix.UUCP> gvr@cs.brown.edu (George V. Reilly) writes: -In article <15884.27b919a3@levels.sait.edu.au> marwk@levels.sait.edu.au (Ray) -writes: -> (1) rewrite the sum as Sum = 2 * S{i=1,i=n-1} S{j=i+1,j=n} f(i,j) -> this cuts the number of calculations in half. -I can make no sense of this statement. It's not equivalent to -the original code. The idea was right, but he handled the diagonal incorrectly.