05.06.2015 23:45, Ciro Santilli writes:
[snip]
> +high, consider using <code>__builtin_expect</code>, e.g., like this:</p>
> +
> +<blockquote><pre><code>
> +if (__builtin_expect (ptr != NULL, 0))
> +  free (ptr);
> +</code></pre></blockquote>

It's strange, that we don't have macros for this, e.g.:
#define likely(x)       __builtin_expect(!!(x), 1)
#define unlikely(x)     __builtin_expect((x), 0)

Is it worth adding them to, say, system.h or ansidecl.h?

-- 
Regards,
    Mikhail Maltsev

Reply via email to