Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

RE: better way to find list members?

by Russ (Deacon)
on Oct 17, 2000 at 03:20 UTC ( [id://37057]=note: print w/replies, xml ) Need Help??


in reply to better way to find list members?

Weigh the benefits between grep and reinvented-wheel.

Yes, grep is not always optimally efficient. However, how much time, effort (and money) will you spend writing a more efficient algorithm to save a few microseconds?

my $Found = 0; for (@Requirements){ if ($_ eq 'KernelDevlopment'){ $Found = 1; last; } } if ($Found != 0){ spend($Time{Extra}); squeeze($CPU{qw/every last cycle/}); } ### vs. ### get_the_job_done() && move_on() unless grep {/KernelDevelopment/} @Req +uirements;
:-)

Russ
Brainbench 'Most Valuable Professional' for Perl

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2024-03-28 08:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found