On Thu, Aug 02, 2001 at 05:18:05PM +0000, David Wagner wrote: > Do you have any proof of this? I'm skeptical that the difference is > noticeable under common usage, but without measurements, I don't know > how to evaluate this claim either way. Well, it would be the difference between: return (!(credentials & REQUIRED_CREDENTIALS)); /* logical not, not bitwise not */ and return (0); While there is no hard and fast rule that one or the other will be faster in all cases, in many cases the 'return (0)' will be faster. (And perhaps the first case is overly complicated .. but no matter how well it is optimized, in most cases it will likely take at least one CPU cycle more than the second case.) And, when the processor in question has only a few million cycles per second, why not help the folks out? _______________________________________________ linux-security-module mailing list linux-security-moduleat_private http://mail.wirex.com/mailman/listinfo/linux-security-module
This archive was generated by hypermail 2b30 : Thu Aug 02 2001 - 18:29:27 PDT