title: Java: Calculate distance between a large number of locations and performance
body: <p>I'm creating an application that will tell a user how far away a large number of points are from their current position.</p>
  
  <p>Each point has a longitude and latitude.</p>
  
  <p>I've read over this article
  <a href="http://www.movable-type.co.uk/scripts/latlong.html" rel="nofollow noreferrer">http://www.movable-type.co.uk/scripts/latlong.html</a></p>
  
  <p>and seen this post
  <a href="https://stackoverflow.com/questions/837872/calculate-distance-in-meters-when-you-know-longitude-and-latitude-in-java">Calculate distance in meters when you know longitude and latitude in java</a></p>
  
  <p>There are a number of calculations (50-200) that need carried about. </p>
  
  <p>If speed is more important than the accuracy of these calculations, which one is best?</p>