On Mon, Nov 01, 2004 at 06:33:50PM +0900, gabriele renzi wrote: > Florian Frank ha scritto: > >On 2004-11-01 12:58:27 +0900, John Carter wrote: > > > >>Really an easy optimization to do. > > > > > >Yep. You could also make it transparent for the clients of your class: > > and you can write your own memoize() method or Memoized class, to > transform a method/class into what you want transparently This is how I did it: http://ntecs.de/blog/Blog/PerformanceQuantenSprung.rdoc I think Robert Feldt's implementation in AspectR (?) is much more advanced, in that each class can have it's own cache. Regards, Michael