On Wed, Sep 07, 2011 at 11:39:37AM +0100, Mark Thomas wrote: > On 07/09/2011 11:34, er...@apache.org wrote: > > Author: erans > > Date: Wed Sep 7 10:34:49 2011 > > New Revision: 1166099 > > > > URL: http://svn.apache.org/viewvc?rev=1166099&view=rev > > Log: > > Added "final". > > Moved declaration of "sum" where it is used. > > You might want to re-consider that. I suspect sum was declared outside > of the inner loops to save allocating memory for a new double on every > iteration of the loop. It may be worth moving the declaration outside > the outer loop too.
Reducing scope makes for clearer code and can lead to _more_ optimized code. Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org