Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Use the new pre-sort function to allow UpdateTurnRelations() and SortTurnRelationList() to be combined into a single SortTurnRelationListGeographically() function that only reads and writes the data once instead of twice.