bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] (x)memcoll: performance improvement when input is known to b


From: Jim Meyering
Subject: Re: [PATCH] (x)memcoll: performance improvement when input is known to be NUL delimited.
Date: Mon, 15 Mar 2010 19:04:24 +0100

Paolo Bonzini wrote:
> On 03/14/2010 03:15 PM, Bruno Haible wrote:
>> Here, the calling convention of providing a string with a size, and the
>> size must include the trailing NUL byte, is so unusual that the probability
>> of a mis-use of the API is likely 10% or more.
>
> You can always use assert so that #define NDEBUG would compile the
> check out.

I agree.

These days, I prefer to use assert(e) over "if (!e) abort();".
We used to have to avoid using assert due to portability issues,
but those went away many years ago.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]