Re: [BK+PATCH] remove __constant_memcpy

From: Jeff Garzik (jgarzik@pobox.com)
Date: Thu Apr 17 2003 - 18:10:36 EST


J.A. Magallon wrote:
> On 04.17, Jeff Garzik wrote:
>
>>On Thu, Apr 17, 2003 at 09:07:45AM -0700, Linus Torvalds wrote:
>
> [...]
>
>> #define memcpy(t, f, n) \
>> (__builtin_constant_p(n) ? \
>> __constant_memcpy3d((t),(f),(n)) : \
>> __memcpy3d((t),(f),(n)))
>>
>
>
> Do you know if this is more efficient ? :
>
> __builtin_choose_expr(__builtin_constant_p(n), ... , ....)
>
> Perhaps ?: reaches runtime, and __builtin doesn't.

No. The existing code (quoted above) is properly evaluated at
compile-time...

        Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Apr 23 2003 - 22:00:22 EST