Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Why is "for" much slower than "while"?

by steve (Deacon)
on Jan 15, 2010 at 16:24 UTC ( #817660=note: print w/replies, xml ) Need Help??


in reply to Why is "for" much slower than "while"?

In addition to what others have said, some additional (external) factors may also contribute to the results you see, for example:
  1. Disk I/O: different filesystems read in different ways and scheduled I/O can be affected by that as well as block size (see tuning information for "elevator" algorithm on ext3).
  2. CPU allocation: other processes can be competing for the same CPU.
  3. Available RAM: loading an entire file into RAM is much quicker than loading a segment of it into virtual memory or a paging file.
  • Comment on Re: Why is "for" much slower than "while"?

Log In?
Username:
Password:

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

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












    Results (50 votes). Check out past polls.

    Notices?