On 04/06/2010 11:05 AM, Marty Anstey wrote:
that said, php is awesome otherwise, been using it for last 2 years strictly in 'enterprise' deployment.. id just say perl is faster and more efficient for batch scripts.
I can't speak specifically to the performance differences for comparible operations in PHP and PERL as I have never done a side-by-side comparison myself. But FWIW, I have parsed multi-gigabyte files with PHP on the command line and it's never been markedly "slow". Sure, it's not pure C but it's never been so slow that i've thought - "heck, this would be a lot faster with PERL"...
One data point that I can speak to is the difference in parsing XML using the expat library between python and PHP for very large files. Python was quite a bit faster than PHP, but I can't recall the exact magnitude (2x? 10x? it's been too long but it was pretty significant). That said, performance is only one reason to use a language over others. PHP programmers are probably 10x more plentiful than python programmers, as another metric. So it very much depends on the larger picture. Mike, who hasn't found the CLI interface to PHP particularly better or worse than others