Re: Benchmarking glib (atleast GList)



On Wed, Mar 24, 1999 at 11:25:08AM +0000, john@giorgio.hart.bbk.ac.uk wrote:
> damon@karuna.freeserve.co.uk wrote:
> >I don't like the current implementation of GList much either. I'd like to
> >see a better one which remembered the tail and you didn't have to keep track
> >of the head yourself.
> 
> I think the cool thing about the current implementation, which you loose with
> this sort of encapsulation, is that empty-list is just NULL. This makes a lot
> of init code much simpler. It also makes recursion down lists possible (no
> list-info block to update). 
> 
> A datastructure with fast addition at either end isn't really a list, it's
> more like a LIFO queue or something. Build it on top of GSList and call it
> something else (GQueue?).

I intend to do something like this in GpLib (my C++ wrapper for
glib) but that will be C++ only :-( Thanks for the naming
sugestion. GpQueue will be nice, except for the corect spelling being
so absurd... ;-) For some info on GpLib see:

   http://www.micropp.se/gplib/

Feedback on the design is most welcome...

I will probably start hacking on lists second half of april...

Thanks /Lars



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]