Re: [Proposal] GRing



On Sat, Aug 18, 2001 at 01:18:23PM -0400, Havoc Pennington wrote:
> Joshua N Pritikin <vishnu pobox com> writes:
> > o GRing offers the space requirements of GList with the performance
> > characteristics of GQueue.  GQueue can be deprecated.
> 
> GQueue is new in 2.0, so we'd probably need to replace it, but it's a
> bit late in the release cycle for that.
> 
> What is the space advantage of GRing over GQueue? The node sizes are
> the same aren't they?

struct GQueue
 {
   GList *head;
   GList *tail;
   guint  length;
 };

The GQueue struct becomes unnecessary since GRing has exactly the same
space requirements as a GList.  i guess this space advantage is not so
dramatic, but the API is better -- NULL is a valid GRing of zero length.

-- 
Get self-realization at <http://sahajayoga.org> ... <http://why-compete.org> ?
  Victory to the Divine Mother!!




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