Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: Re: Things every perl programmer should know? (faster?)

by BrowserUk (Pope)
on Jun 04, 2003 at 23:32 UTC ( #263182=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Things every perl programmer should know? (faster?)
in thread Things every perl programmer should know?

You don't mention which version you ran your test on, but if it was 5.8, part of the reason could be that glob now returns the files pre-sorted (according to perldelta).

However, I think that tye was alluding to that the OP's code shows not just reading list of files, but looping over them, opening and reading each one in turn. Assuming that the opening and reading part stayed the same, 2 or 3 seconds on generating the list is unlikely to make a significant difference overall.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller


  • Comment on Re: Re: Re: Things every perl programmer should know? (faster?)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://263182]
help
Chatterbox?
[marto]: Hey Corion, how are things?
[Corion]: Fine! It's amazing how productive I can be with a 3hour daily workload removed :)
[Corion]: My to-do emails level is at a 12-months-low of 21 , from 36 last week ;)
[marto]: I'm recovering from a bad day yesterday, on most counts :P
[Corion]: Also , I made great progress in actually writing the automation script that will run large parts of the 3hour workload now, largely by discussing what error conditions need to be handled by manual intervention and reducing these :)
[Corion]: marto: Ow! What was so bad about yesterday?

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2018-05-24 07:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?