Hmm, I thought I was just printing the hash length?? Am I missing something?

ricky

-----Original Message-----
From: Kevin Smith [mailto:sent / qualitycode.com]
Sent: Tuesday, February 13, 2001 10:45 AM
To: ruby-talk ML
Subject: [ruby-talk:10786] Re: perform. of Dir["**/*"]


Richard Hensh wrote:
>Now that someone has straightened me out on the use of **, I have a
>performance question. Running the following script on my C: drive took
about
>497 seconds. The drive contains 32701 files. Is this slow?
>
>def testme
>  a = Time.now
>  puts Dir["**/*"].length
>  b = Time.now
>  puts b-a
>end

Well, you're printing out 64 filenames per
second, which seems reasonable, since video
output is notoriously slow. Try either not
puts'ing the results, or redirecting the output
to a file to see if it speeds up dramatically.

Kevin