John Darrington <[EMAIL PROTECTED]> 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. Comments? -- "While the Melissa license is a bit unclear, Melissa aggressively encourages free distribution of its source code." --Kevin Dalley <[EMAIL PROTECTED]> _______________________________________________ pspp-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/pspp-dev
