From: Robert Klemme Date: 2008-02-22T02:06:16+09:00 Subject: Re: Object#freeze as a basis for caching of method results? 2008/2/21, Shot (Piotr Szotkowski) : > // Thanks a lot for that delegate tutorial in the other post – > // I finally understood what's delegation for and how to do it! :) Nice side effect of this thread. :-) > Robert Klemme: > > 2008/2/21, Shot (Piotr Szotkowski) : > > Now, whether you use the String or demarshal probably mainly depends > > on memory usage. If the String is short enough that approach is > > certainly preferable because it incurs less processing overhead > > (demarshaling). > > Ok, I'm totally lost here. I don't see any demarshalling happening, > just marshalling (and using that as a key)… What am I missing? Demarshalling was the option I had thought of. A copy through marshalling _might_ use less memory than the marshaled form (the String). > > What kind of dope are *you* smoking? :-) > > I'm a PHP programmer˛ by day. Uh, oh. *cough* :-) > ˛ http://civicrm.org/ > > -- Shot (seriously, though, it's a sig of unknown origin from Stewart > Stremler's collection: http://www-rohan.sdsu.edu/~stremler/sigs/sigs.html) :-) Cheers robert -- use.inject do |as, often| as.you_can - without end