[Top][All Lists]

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

Re: casefile.c revision

From: Ben Pfaff
Subject: Re: casefile.c revision
Date: Sat, 04 Jun 2005 17:07:26 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

John Darrington <address@hidden> writes:

>              A. Add a casereader_clone() that makes a new copy of a
>                 casereader, so that we can read ahead in one
>                 casereader and then make another pass across that same
>                 data in anther one.


>      I like A and C the best.  I don't think C would even need any
>      change to the casefile code, although some optimization might be
>      helpful.
> From the programmer's perspective (ie. the person writing rank like
> commands) I think that A is the best.  The only thing is, one has to
> bear in mind that casereader_clone()/ casereader_destroy() will be
> called at least once per case, so some optimisation would be in order
> here too --- perhaps a memory pool dedicated to each casefile would be
> a good idea.  

Here is what I imagine to be the common case: only one case, or a
few, with equal values that must be grouped together.  This group
will typically be within a single disk buffer, because I expect
that a single disk buffer will typically hold several cases.

I think I could make the common case very fast.

> Also, I suppose it'd not make sense to clone a destructive
> reader?

I think that we'd want to make that work, actually.  We can only
discard cases that no existing casereader can read, but most of
the time that's most of the cases.

If you like this approach, I can implement the casefile parts
pretty easily.

"While the Melissa license is a bit unclear, Melissa aggressively
 encourages free distribution of its source code."
--Kevin Dalley <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]