in reply to Revisiting array context
Why not use threads instead? You could have one thread reading off the file system and caching the stat info while the other thread is popping off your cache.
If you did this, I'm going to guess, most of the time your incrementing thread is going to be waiting anyway.
If you are running this on a linux system, you will get better performance (not really, but your script will run faster) if you do this:
Linux will most likely cache most of the info into memory :) Some other os's will do this too ;)find .; ./count.pl
|
|---|