Update neighbor search algorithm to drastically improve performance