This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH 2/3] dynarray: Implement remove function
On Wed, 7 Feb 2018, Adhemerval Zanella wrote:
> This patch implements the remove item function for dynarray array.
> It is a costly operation, since it requires a memory move operation
> possible as large as the array size less one element.
If preserving order is not required, then removing an element is as
cheap as moving only the last element to the position of the removed.
If order preservation, is, in fact, part of the intended interface,
then shouldn't the new function be named like '..._ordered_remove'
to reflect that?