[Top][All Lists]
[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.
- Re: [PATCH] (x)memcoll: performance improvement when input is known to be NUL delimited., Chen Guo, 2010/03/08
- Re: [PATCH] (x)memcoll: performance improvement when input is known to be NUL delimited., Bruno Haible, 2010/03/08
- Re: [PATCH] (x)memcoll: performance improvement when input is known to be NUL delimited., Chen Guo, 2010/03/08
- Re: [PATCH] (x)memcoll: performance improvement when input is known to be NUL delimited., Chen Guo, 2010/03/08
- Re: [PATCH] (x)memcoll: performance improvement when input is known to be NUL delimited., Bruno Haible, 2010/03/14
- Re: [PATCH] (x)memcoll: performance improvement when input is known to be NUL delimited., Paolo Bonzini, 2010/03/15
- Re: [PATCH] (x)memcoll: performance improvement when input is known to be NUL delimited.,
Jim Meyering <=
- Re: abort vs. assert, Bruno Haible, 2010/03/15
- Re: abort vs. assert, Jim Meyering, 2010/03/15
- Re: abort vs. assert, Bruno Haible, 2010/03/15
- Re: abort vs. assert, Paolo Bonzini, 2010/03/16
Re: [PATCH] (x)memcoll: performance improvement when input is known to be NUL delimited., Chen Guo, 2010/03/10
Re: [PATCH] (x)memcoll: performance improvement when input is known to be NUL delimited., Bruno Haible, 2010/03/14