[vlc-devel] [RFC 3/3] vlc_arrays: append items in amortized O(1)
robux4 at ycbcr.xyz
Mon Jul 23 08:25:37 CEST 2018
On 22/07/2018 18:19, Denis Charmet wrote:
> On 2018-07-22 14:08, Rémi Denis-Courmont wrote:
>> Le jeudi 19 juillet 2018, 18:57:18 EEST Romain Vimont a écrit :
>>> typedef struct vlc_array_t
>>> + size_t i_capacity;
>> AFAICT, a new member is not really necessary.
>> If you allocated by power of two, it'd be easy to detect when to
>> the allocation.
> Don't you fear that the exponential growth could cause other issues?
Adding 50% at each increase is also exponential just slower. My
understanding is that Romain picked that value from common other
> Denis Charmet - TypX
> Le mauvais esprit est un art de vivre
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel