title: Cloud computing - PHP & MySQL
body: <p>I have an algorithm written in PHP which communicates with MySQL. On standard shared hosting server it takes about ~5 seconds to calculate. My question is - how can I speed it up (of course without changing the algorithm itself), use dedicated/VPS, maybe some cloud computing or...?</p>
  
  <p>What are your suggestions?</p>
  
  <p><b>EDIT:</b> It's <b>Dijkstra algorithm</b> for public transport. I have (only) 3500 unique stops.</p>
  
  <p>In short - I have multiple arrays for recording active stops, previous stops, lineToStop, totalTime, travelingTime and so on. I loop for number of stops, get an id of a stop, build connections to other stops (based on the time on that active stop), loop again for size of stops() to find the one with the lowest value, mark it as active and continue again.</p>
  
  <p>I realized it's optimizatio problem so - > <a href="https://stackoverflow.com/questions/5034623/dijkstra-algorithm-optimization-caching">Dijkstra algorithm optimization/caching</a></p>