Steve Fink wrote:

> On Mon, Oct 07, 2002 at 11:25:31PM +0200, Leopold Toetsch wrote:

>>If conserving memory is an issue, list.c is much more efficient for very 
>>small and very big arrays. We will see.
>>
> 
> Sounds good to me. I originally wrote, and am currently using, intlist
> for regular expressions. (The stuff checked into languages/regex
> generates code that uses it, although I haven't committed the hooks to
> allow languages/perl6 to use languages/regex instead of its native
> code.) The access pattern for regexes is very simple: it only uses it
> as a stack. 


.... where depth depends on the backtracking behaviour of the rule and 
isn't know in advance. So the small items would be a win for probably 
90% of the usage.

> ... It *might* be useful to be able to pop off multiple
> entries at once (or equivalently, set the size of the array/list), 


list_delete(interp, list, idx, n_to_delete)

would do this, if (length-1-idx) == n_to_delete. But just adjusting the 
array length is probably simpler.

list_delete isn't ready yet, but the infrastructure is almost finished.

> ... and
> it might be useful to be able to append another array onto the end.


These are just list_assigns in a loop.

> But that's it. So I know of no reason for intlist.c to be kept
> separate; I'm perfectly happy having it replaced by list.c.

Fine, $code_duplication-- - soon.

leo

Reply via email to