[DGD] Resolve Path & Array Efficiency

Felix A. Croes felix at dworkin.nl
Sat Feb 21 11:26:04 CET 2004


Michael McKiel <crashnbrn71 at yahoo.ca> wrote:

>[...]
> Now I know efficiency hardly matters when dealing with such a small number of
> elements of an array, but what I was wondering - when dealing with MUCH
> larger array's would it be more/less efficient to be removing ({ nil })
> elements or to rebuild the array's via concatenation: 
>     dirs = dirs[#1 .. #2] + dirs[#3 .. #4];

Most efficient, following your general method, would be to assign nil
to removed path components, and then remove all nils with a single
-= ({ nil }) at the end.

Regards,
Dworkin
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list