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

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!

Replies are listed 'Best First'.
RE: (5) Re: Complex Hash
by Adam (Vicar) on Sep 06, 2000 at 04:39 UTC
    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.

      I read every one of your posts carefully. You complained
      That would work well if GetEMailFor() was being called lots of times with the same query, but it isn't. Its being called several times with almost every query being different.
      Which indicates to me that you don't get that it's the individual components of a query that were memorized, not the overall call to GetEMailFor. If you believed contrary, you weren't clear. And when you further buttressed your position, including complaining about my joking PurlGurl reference that you seemed to have missed both dimensions of the speedup (since you acknowledged neither), I became more convinced that you were missing the point.

      Sir, I know nothing (nor presume nothing) of your Perl skill except what you are able to demonstrate here. In fact, to keep things simple, I always presume you know precisely what you demonstrate, and perhaps a little more.

      Do not presume that I "look down" on anyone here. Heck, just today, someone pointed out a CPAN module that I wasn't aware of. I love the ability to exchange info!

      But if you want me to accept that you completely comprehended my previous message, perhaps you could have communicated it in a way that I believed that. In my world, you didn't. I'd love to hear other feedback though.

      -- Randal L. Schwartz, Perl hacker