Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Use and Require - making an informed choice.

by ambrus (Abbot)
on Jan 31, 2006 at 07:51 UTC ( [id://526679]=note: print w/replies, xml ) Need Help??


in reply to Use and Require - making an informed choice.

In the newer version of the egrep clone with function name display (a snapshot can be downloaded from http://www.math.bme.hu/~ambrus/pu/cgrep) I require the File::Find module only if a recursive grep is requested.

I just did a quick mesurement to see how much time this conserves. I ran a grepping command on a single small file that runs very fast. When I didn't use recursive grepping, the command ran in 0.49 seconds. When I turned on recursive grepping (which doesn't make much sense as I haven't given any directories only a single file) it ran in 0.78 seconds. As a comparision, the grep program (which is written in C) always did the same search in 0.00 seconds, whether recursive or not.

  • Comment on Re: Use and Require - making an informed choice.

Log In?
Username:
Password:

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

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

    No recent polls found