The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Shortest path in php

I need to implement the shortest path algorithm in PHP with a dataset consisting of over 10,000 connected nodes.

Links to good mathematical libraries will be appreacited a lot
Mosaix
Wednesday, June 21, 2006
 
 
Go directly to

"Writing Efficient Programs"

by Jon Louis Bentley.

The whole book is oriented around the efficient solution of the shortest path problem.
EvilTeach Send private email
Wednesday, June 21, 2006
 
 
Write a naive implementation (e.g. breadth-first-search with an array as stack). If that isn't fast enough, write a seperate C(++) program and call that from PHP (or use the bindings).

Don't waste time by writing an efficient solution in PHP, because PHP only knows varying degrees of slow. Either slow is OK, and then your PHP solution can be written in 15 minutes, or slow is not good enough and then PHP is simply insufficient.
WPARAM
Wednesday, June 21, 2006
 
 
Getting closer to the hardware will speed things up... go to C if possible.
KC Send private email
Friday, June 23, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz