Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Sep 2003 23:16:39 -0700
From:      David Schultz <das@FreeBSD.ORG>
To:        Maxime Henrion <mux@FreeBSD.ORG>
Cc:        cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/sys cdefs.h
Message-ID:  <20031001061639.GA19012@VARK.homeunix.com>
In-Reply-To: <200309302045.h8UKjE9j021972@repoman.freebsd.org>
References:  <200309302045.h8UKjE9j021972@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 30, 2003, Maxime Henrion wrote:
> mux         2003/09/30 13:45:14 PDT
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/sys              cdefs.h 
>   Log:
>   Introduce new __predict_false(exp) and __predict_true(exp) keywords.
>   Their purpose is to give explicit hints to the compiler to judge
>   the likelyhood of a test to succeed or fail.  Not all architectures
>   have support for such optimizations, but for those who do, it can
>   give a nice performance improvement in hot loops.
>   
>   Obviously, this should be used very rarely in very specific code.
>   
>   Reviewed by:    peter
>   Obtained from:  OpenBSD

Cool, I'm glad we finally have these.  (FWIW, I believe the macros
originated with NetBSD.)  Hopefully they will be used with reservation.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031001061639.GA19012>