Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: XML::Parser ( or Perl internals ) speed mysticism

by perrin (Chancellor)
on Mar 25, 2006 at 20:10 UTC ( [id://539224]=note: print w/replies, xml ) Need Help??


in reply to XML::Parser ( or Perl internals ) speed mysticism

Your OS is caching the file in memory so it doesn't have to read it from disk again.
  • Comment on Re: XML::Parser ( or Perl internals ) speed mysticism

Replies are listed 'Best First'.
Re^2: XML::Parser ( or Perl internals ) speed mysticism
by graff (Chancellor) on Mar 26, 2006 at 07:18 UTC
    I think that if caching had any effect on this at all, it involves the difference between 0.557s (first run) and 0.031s (second run), which represents the number of seconds of cpu time spent servicing OS library calls -- in other words, negligeable.

    If the OP's data is 18400 lines like the first few shown, that's well under 2 MB total, and reading from disk vs. cache memory for that amount of data could not account for a difference of over 40 sec in run times.

    sfinks's reply looks good...

    (update: I had mistakenly put in the wrong monk's name when linking to the reply that follows -- sorry about the confusion, and thanks to the monks who msg'd me about it.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-20 02:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found