Re: The Demise of Simple Assurance?

From: Seth Arnold (sarnoldat_private)
Date: Thu Aug 02 2001 - 18:31:10 PDT

  • Next message: David Wagner: "Re: The Demise of Simple Assurance?"

    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 */
    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

    This archive was generated by hypermail 2b30 : Thu Aug 02 2001 - 18:29:27 PDT