in reply to RE: Re: Complex Hash
in thread Complex Hash

Please relook. I'm memoizing the underlying individual items. Not the combination of what's being called to GetEMailFor.
"Please read for comprehension!" -- PurlGurl {grin}

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
RE: RE: RE: Re: Complex Hash
by Adam (Vicar) on Sep 06, 2000 at 04:29 UTC
    Yes, but the combination is not what matters. Its almost a red herring. In fact, I'm not even using that ability (yet), I merely provided for it in case I needed it. (and if I find that I don't I will probably take it out.)

    What is bothering me is that I have to check every key until I find the match, starting from some arbitrary point. (Arbitrary to me, not Perl) I lose the true advantage of an associative array... the hashing algorithm.

    By the way, your quote:
    "Please read for comprehension!" -- PurlGurl {grin}
    Implies that I didn't comprehend your suggestion. I am offended at your arrogance.

      Did you read my code? I already turned your second-level linear search into a simple hash lookup. From a O(N*M) operation to a O(N) operation for N categories, M names per category. And then, I'm memoizing that, so it's speed up on any subsequent hits!

      -- Randal L. Schwartz, Perl hacker


      P.S. As for your P.S., you didn't read my code, so my statement is all the more accurate!
        I did read your code, and I did see your first enhancement, but as the majority of your post related to Memoize I responded to that aspect of it. I am increasingly offended by your inability to accept that I might know a little Perl. I am the first to admit that I do not know as much as you, nor anywhere close, but I do not appreciate being talked down to any more then the next Monk.

        You may respond to this at your leisure... I am in no hurry to start an aggravated debate with you. I have not voted -- on any of your posts on this thread, nor am I the kind of person who would. I am also not the kind of person that likes to get into personality debates. I would much rather discuss Perl and Computer Science. Thank you and good night.