Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^5: Finding Usable Nodes in our Cluster

by jwkrahn (Monsignor)
on Apr 12, 2008 at 01:12 UTC ( #679908=note: print w/replies, xml ) Need Help??


in reply to Re^4: Finding Usable Nodes in our Cluster
in thread Finding Usable Nodes in our Cluster

Is there any considerable speed advantage to using the string instead of the array? Or does it have to do with memory usage?

Using strings instead of arrays will definitely use less memory as each scalar has a certain amount of overhead so two strings vs. two arrays of strings will use less.   Another way to reduce memory usage is to use a piped open and read each line in a while loop.

As for speed, it depends on how much IO overhead is involved from reading the output of an external program.   But in general using strings should be faster than using arrays.   As always, if in doubt use Benchmark or one of the profilers to determine the speed differences.

This may also provide some help: When perl is not quite fast enough

  • Comment on Re^5: Finding Usable Nodes in our Cluster

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2022-01-19 17:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (55 votes). Check out past polls.

    Notices?