> Le 29 sept. 2018 à 08:23, Paul Eggert <[email protected]> a écrit :
> 
> Akim Demaille wrote:
>> why didn’t you use alloca?
> 
> It's common that alloca does not check for stack overflow, so alloca (N) is 
> unwise if N is unbounded. I did consider using alloca if N is small, but even 
> then it’s a win to use malloc in the typical case where uniqstr_concat 
> generates a new string, because in that case malloc needs to be called anyway 
> and using alloca would mean an unnecessary copy.

Thanks!

>> Joel’s trick for UNIQSTR_CONCAT was amazing :)
> 
> I was hoping you'd say that about *my* trick for UNIQSTR_CONCAT. Oh well :-)

:) :) :)

Reply via email to