commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james_strac...@yahoo.co.uk>
Subject Re: [collections][PATCH] LRUMap - license, docs update
Date Fri, 15 Feb 2002 16:47:38 GMT
----- Original Message -----
From: "Morgan Delagrange" <mdelagra@yahoo.com>
> ----- Original Message -----
> From: "Michael Smith" <michael@iammichael.org>
> To: "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>
> Sent: Friday, February 15, 2002 7:41 AM
> Subject: RE: [collections][PATCH] LRUMap - license, docs update
>
>
> > -----Original Message-----
> > From: James Strachan [mailto:james_strachan@yahoo.co.uk]
> > > ----- Original Message -----
> > > From: "Michael Smith" <michael@iammichael.org>
> > > > > 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:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message