HomeFreeBSD

sh: Make struct arglist an array instead of a linked list.

Description

sh: Make struct arglist an array instead of a linked list.

This simplifies the code (e.g. allowing use of qsort(3) instead of a
hand-rolled mergesort) and should have better cache properties.

The waste of unused args arrays after resizes is approximately the same as
the savings from getting rid of the next pointers.

At the same time, remove a piece of global state and move some duplicated
code into a function.

Details

Provenance
jillesAuthored on
Parents
rS289158: Default TESTSDIR to /usr/tests/${RELDIR:H}
Branches
Unknown
Tags
Unknown