title: Increasing computation speed in Fortran
body: <p>I have some basic psuedo code as follows,</p>
  
  <pre><code>PROGRAM PSUEDOEXAMPLE
  IMPLICIT NONE
  !Define all types
  
  !Load some data into arrays: Array_I, Array_J
  
  
  !Do Loops
  do i = 1,10
     xi = Array_I(i,1)
     yi = Array_I(i,2)
     zi = Array_I(i,3)
  
     do j =1,10
        xj = Array_J(j,1)
        yj = Array_J(j,2)
        zj = Array_J(j,3)
  
        separation = ((xi - xj)**2 + (yi-yj)**2 +(zi-zj)**2)**0.5
  
     enddo
  
  enddo
  
  
  
  END PROGRAM PSUEDOEXAMPLE
  </code></pre>
  
  <p>I can time the time it takes for a single <code>i</code>-step to be ~0.3 seconds. What are the best ways to reduce this time? I can see potentially removing the square root would be effective. I am using gfortran as my compiler.</p>