in reply to Re: Re: Beauty is in the eye of the beholder
in thread Beauty is in the eye of the beholder

You quoted me, and then didn't follow my lead. "But if you do this a lot of times, you're kissing inefficiency on its ratty lips."

You performed these tests ONCE each. Use the first() function several times. Scan through the array several times. Create the hash ONCE, and use exists() many times.

japhy -- Perl and Regex Hacker
  • Comment on Re: Re: Re: Beauty is in the eye of the beholder

Replies are listed 'Best First'.
Re: Re: Re: Re: Beauty is in the eye of the beholder
by McD (Chaplain) on Feb 21, 2001 at 05:58 UTC
    Nuts. You're absoloutly right.

    I misunderstood what you meant at first - now I see. This is a perfect example of the classic tradeoff of speed vs. memory.

    Which brings us back to meditation, after all, doesn't it?

    Time for a beer, methinks. All this tinkering and meditating is thirsty work. Thanks for following up!

    Peace,
    -McD