[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] Perl tips



On Mon, 2002-11-25 at 18:02, Dave Mitchell wrote:
> Pointless benchmark follows :-)

Is there any other sort? :o)

> on my work desktop system (sparc/solaris),
>     using a hash took 6 secs and a 7.2M process size;
>     using a function took 34 secs and a 5M process.

Hmm. Mine uses a bit more memory than yours, and I would argue on two
points your benchmark isn't fair: 1. your function is slower than it
could be (you could compile the regex for example, although how much
difference that would make depends very much on the regex in question I
guess), 2. words tend to be shorter than filenames, and hashes get big
very quickly with 'large' data (even something like a fully qualified
file path, I would have thought - given they can get quite long).

But, yeah, it is slower...

Cheers,

Alex.

Attachment: signature.asc
Description: This is a digitally signed message part