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.) | [reply] |