Re: weird strncmp usage?

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

 



* Andy Whitcroft:

> If you are doing these a _lot_ then there is a significant additional
> cost to using strlen on a constant string.

strlen has been a GCC builtin for quite some time.  If the wrapper
function is inlined, GCC will optimize it away.  (It also turns the
strncmp into a memcmp, which is slightly wrong.)
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]