nanog mailing list archives
Re: Books for the NOC guys...
From: Marty Anstey <marty.anstey () sunwave net>
Date: Tue, 06 Apr 2010 11:05:27 -0700
Max Gribov wrote:
On 04/06/2010 01:17 PM, Marty Anstey wrote:Nick Hilliard wrote:"PHP stinks on the command line and text processing"This is a bit of a broad sweeping statement! Can you elaborate on what your definition of how PHP "stinks" in this context?well, try to parse ~60mb csv file doing some simple tweaks to the input and then insert it into the database, and watch how much ram your script will use, as well as how long it will take vs perl.. for me, it takes about 5 hours and eats up to 1gb of ram (configured memory limit for php for me)
Hi Max, While I appreciate where you're coming from, I've never had that issue. It sounds like you're trying to load the entire script into RAM and then parse it. Regardless of the language you are using, you'll still essentially get the same result.
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"... Just my $0.02... Cheers, -Marty
Current thread:
- RE: Books for the NOC guys..., (continued)
- RE: Books for the NOC guys... Scott Berkman (Apr 02)
- Re: Books for the NOC guys... Nick Hilliard (Apr 02)
- Re: Books for the NOC guys... Michael Thomas (Apr 02)
- Re: Books for the NOC guys... Chris Adams (Apr 02)
- Re: Books for the NOC guys... Bryan Irvine (Apr 02)
- Re: Books for the NOC guys... Steven Bellovin (Apr 02)
- Re: Books for the NOC guys... Ray Sanders (Apr 02)
- Re: Books for the NOC guys... Michael Dillon (Apr 02)
- Re: Books for the NOC guys... Lamar Owen (Apr 02)
- Re: Books for the NOC guys... Marty Anstey (Apr 06)
- Message not available
- Re: Books for the NOC guys... Marty Anstey (Apr 06)
- Re: Books for the NOC guys... Michael Thomas (Apr 06)
- Re: Books for the NOC guys... Robert E. Seastrom (Apr 06)
- Re: Books for the NOC guys... Bryan Irvine (Apr 02)
- Re: Books for the NOC guys... Stefan (Apr 02)
- Re: Books for the NOC guys... Owen DeLong (Apr 02)