Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: How Perl Optimize your code & some code TIPS ;-P

by kodo (Hermit)
on Jan 24, 2003 at 08:26 UTC ( [id://229564]=note: print w/replies, xml ) Need Help??


in reply to How Perl Optimize your code & some code TIPS ;-P

Nice post! Nothing new to me, but nice to read and easy to understand...

But I'm not sure about the:
Other thing, if you want to process the lines, don't cat all the file + inside a @array, to after this process them! Is better to read and p +rocess, this is faster and use less memory: open (FLHD,"$0") ; while (my $line = <FLHD>) { my ($x , $y , $z) = split("::" , $line) ; }

Part, I'll have to benchmark this again if I find some time. I think I did this before and my result was that if you have lots of things to modify an array/hash is better...

giant

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://229564]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-25 14:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found