Speed โโdifference: minimal. All you save is blocking NET I / O and connections (and apache overhead, which are negligible).
How to do it:
bash> php -f /path/to/my/php/script.php
You may have the php5-mod package installed, which is php for apache, you may have to install the actual command line interpreter, however many distributions install both. Personally, I think you have a performance problem in the algorithm. Something that takes days and days seems to be accelerated by caching and analyzing performance in the worst case (Big-O note).
In addition, php vanilla is not very fast, there are many ways to do it very fast, but if you are doing heavy calculations you should consider c / C ++, C # / Mono (Maybe), maybe python (can be precompiled, actually can't be much faster).
But exploring these other remedies is highly recommended.
Arena source share