From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <36DEFE48.79926BB3@frankfurt.netsurf.de> Date: Thu, 04 Mar 1999 22:42:32 +0100 From: Joachim Wesner Subject: Re: Force calculation with neighbourlist In-Reply-To: <36DEE27D.C293552A@theophys.kth.se> Joachim Wesner wrote: > > Erik Lindahl wrote: > > > > > The routine below is an inner loop in a molecular dynamics program. > > > This code is called once for each atom every timestep. A typical > > system might contain 30000 atoms and each particle has a couple of > > hundred of the others as neighbours. > > I would DEFINITELY suggest trying to use vectorized sqrti, you HAVE > pretty large vectors as it seems (30000) and it' s about 5-7 times > faster than. I already can hear the "any cache-trashing is bad" fraction > howl when you use so much "local" memory, but I clearly would suggest a > try. Maybe you later should try to split the 30000 vectors in smaller > parts to feed to sqrtiv ?? Sorry, I seems that your vector length is limited to only the local fraction, yet, vectorized sqrti as K. Goto did, is very effective even on pretty short vectors (0.028*n + 0.12) instead of 0.13*n microsec as I find ,so you should gain enough. (AND you don't "stress" L1 cache so much). JW