in reply to How to make this perl version of "du" faster?

I've done several tests with your code and am getting a pretty consistent 3.5 to 1 ratio. I think you may be failing to take filesystem caching into account. I ran your code and du multiple times on really large directory trees (~500k entries) and came up with 3.5x with their best times, so I think you have nothing to worry about.

Update in response to dgaramond2's reply: I'm running a much wimpier system, Sempron 2700, Ubuntu 8.04 LTS, 2.6.24, ext3(ide).

  • Comment on Re: How to make this perl version of "du" faster?

Replies are listed 'Best First'.
Re^2: How to make this perl version of "du" faster?
by dgaramond2 (Monk) on Oct 28, 2009 at 17:40 UTC

    Don't think so, I've run the benchmark multiple times in succession, as well as reverse the order. Same thing. I'm using A64 5100+, Ubuntu 9.10 & Debian 5.0, Linux 2.6.31 & 2.6.26, ext3.

    Will try some more and also tried the obvious profiling route. Thanks for the reminder & all the responses.