----- Original Message ----- From: "Morgan Delagrange" <[EMAIL PROTECTED]> > ----- Original Message ----- > From: "Michael Smith" <[EMAIL PROTECTED]> > To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]> > Sent: Friday, February 15, 2002 7:41 AM > Subject: RE: [collections][PATCH] LRUMap - license, docs update > > > > -----Original Message----- > > From: James Strachan [mailto:[EMAIL PROTECTED]] > > > ----- Original Message ----- > > > From: "Michael Smith" <[EMAIL PROTECTED]> > > > > > Maybe renaming it to FastLRUMap that approximates LRU but > > > > > isn't totally > > > > > accurate in all circumstances might help? > > > > > > > > To me, that makes it even more confusing. > > > > > > OK how about calling it LFUMap - "least frequently used" > > > which seems a more > > > accurate description of the algorithm than "least recently used". > > > > I think for now, we're really kind of stuck with the name. We'll need > > to maintain the name for Collections 1.x to maintain API compatibility. > > > > Morgan has done a little work on LRUMap recently. I haven't gotten the > > chance to take a peek, but maybe he fixed the bubble list so it really > > is a least recently used? Morgan, can you confirm/deny? > > > > Nope, haven't fixed the bubble list yet. It's implemented as an ArrayList, > which makes it impractical to move elements to the front. I'll need to > reimplement it as a LinkedList, TreeSet or something similar. I think it's > worthwhile to make this class true LRU though.
Agreed. I originally went with the bubble list for efficiency but I guess a LinkedList isn't too bad these days. Would using a LinkedList and moving it to the front (rather than bubbling up one) make the LRUMap 'least recently used' or would folks still think of it as 'least frequently used'. James _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>