HomeFreeBSD

style(9): Add comments about branch prediction

Description

style(9): Add comments about branch prediction

This is a partial merge of:

cdefs.h: Add back comment about branch prediction

Add back, with editing, the comments about branch prediction, when to
use it, etc. Offer stronger opinions about this in style(9). Add in the
convention for FreeBSD that we do only the entire expression in the if
expression. Advise use only when it makes things measurably faster.

Requested by: jhb
Sponsored by: Netflix
Reviewed by: brooks, jhb
Differential Revision: https://reviews.freebsd.org/D45837

(cherry picked from commit fd31c0946ee2240491db1301c2d33eb846221a54)

Details

Provenance
impAuthored on Jul 3 2024, 6:52 PM
brooksCommitted on Dec 13 2024, 9:34 PM
Reviewer
brooks
Differential Revision
D45837: cdefs.h: Add back comment about branch prediction
Parents
rG76ec0faf1ce7: style(9): Delete __FBSDID straggler
Branches
Unknown
Tags
Unknown