A comparison of several routing-engines – Which one is the fastest?
by Pascal Neis - Published: July 6th, 2011
In the past blog post I wrote about the newest changes and encoding techniques that have been implemented in the Open Source Routing Project (OSRM). So I think it is time do a little comparison analysis about the request/response time of several routing APIs. The main question I wanted to answer was: “Is an OpenStreetMap direction service faster than G**gle?” I tested the following direction APIs for cars (fastest): MapQuest, CloudMade, G**gle and finally OSRM. For the analyses I wrote a small Java tool, which measured the time to get a result of a routing-service. I did all tests at home with a “regular” 12kbit/s internet connection. I tested several distance levels and the results can be seen in the following table. It shows the average times of five requests for each route with a delay of 3 seconds between each request/response. Overall I did this analysis three times.
The results are quite impressive. OSRM calculates the fastest route for all five test routes! Unfortunately we do not have any information about the server infrastructure at G**gle, MapQuest or CloudMade but the OSRM engine is running on a virtual server with limited hardware resources. It seems that the CloudMade directions service does not like Paris very much, as can be seen in the following image 😉
I will try to do a second comparison with Bing Maps, YOURS and Routino. So stay tuned …
— Update —
>> The second blog post is here: Comparison of (OSM) routing-engines – Reloaded <<
thx @ maɪˈæmɪ Dennis 🙂
nice comparison! but two things that come to my mind:
– why are osrm-routes that much shorter? you chose fastest route, right? either the osm-data provide a better route (e.g. with map-information like maxspeed) or the osrm results are not the fastest route.
– the distance of osrm-routes are always prim. is osrm rounding the last digit?
like to see more routing-engine comparisons 🙂
Thank You!
OSRM routes are 5 km shorter in these examples, because the algorithm takes a primary road and not a motorway to get to the destinations. You can see a screenshot of the route here: http://neis-one.org/wp-content/uploads/2011/07/why_is_OSRM_shorter.png
As you can see, the route goes along the primary road “B1” and not the motorway “A115”. These are the 5 km difference which G**gle and the other providers are showing ….
All routes of the comparison have the same start coordinate somewhere in Berlin and all go more or less in the same direction (south-)west. The following happens for all tested routes:
There is an important junction somewhere in the south-west of Berlin where all engines pass by. The other engines go to the highway earlier but take a detour to reach that junction. OSRM uses the primary road to do so. The difference in travel time is probably very small, but the travelled distance is about 5km different.
Just because it’s the fastest to return the route or the shortest distance it might not fast the fastest to drive or the best route based on a variety of other factors. Have you looked at the information that is returned along with the route? Maybe some are providing more info and there is an option to turn that extra info off?
Thanks for pointing this out! MapQuest, G**gle and OSRM are compressing the geometry of the route. CloudMade does not do this. So probably this is a reason, why the CloudMade route requests are slower than the others …
another thing:
orsm-gui requires confirming the entered locations. google just picks a location (probably based on common route-requests or other search-requests). did you consider and add the time that elapsed while preselecting the start and destination (the time osrm is searching for these entered locations)?
Thanks again!
That’s a good point you are mentioning. I always used the coordinates of the addresses for my requests to the services. That means, I do not use any addresses for the start or destination point in any request. You are right that these can probably slow down the request/response time …
Can you tell me, if OSRM provides routing API(javscript) as google does? Or if you suggest me some services that provide routing API like google and Bing
Hi Anuja,
you can find the information here: https://github.com/DennisOSRM/Project-OSRM/wiki/Server-api
at first thnx for the quick reply.But it couldn’t help me. I have developed a website, where I create route using Google map. And for offline map i use Bing map API. In OSRM Can’t we create route on the map by just clicking on the map to create a POI and then create route by creating next POI by clicking the map. And can we edit the route if we want (changing POI location by clicking the map or by dragging the POI)? What about cloudemade and mapquest? i found in wiki (http://wiki.openstreetmap.org/wiki/Routing/OnlineRouters) that mapquest doesn’t guarantee service, so which one should I pick?
[…] C’est actuellement le moteur d’itinéraire le plus rapide qui existe selon l’étude faite par Pascal Neis : Source : Neis One […]
Can I ask how to write that Java tool to compare the routing engines?
I think you can do this also by a short script. For getting some ideas see e.g. http://qnimate.com/measuring-web-page-performance-using-modern-javascript-apis/