Gosmore uses a style file to define average speeds for each road type, coupled with turn-restrictions and barriers this gives the fastest route. I think the algorithm is a variant on ‘shooting star’.