From 9e79857b5cf05a263899fda6dcba636a3732d668 Mon Sep 17 00:00:00 2001 From: thorpej Date: Mon, 8 May 2000 22:41:38 +0000 Subject: [PATCH] Add an additional usage note about using __predict_*() only in hot spots, as suggested by Chris Demetriou. --- sys/sys/cdefs.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index d58da119a392..58fc5683de6c 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs.h,v 1.33 2000/05/08 18:36:00 thorpej Exp $ */ +/* $NetBSD: cdefs.h,v 1.34 2000/05/08 22:41:38 thorpej Exp $ */ /* * Copyright (c) 1991, 1993 @@ -215,6 +215,12 @@ * * Other than that, if you don't know the liklyhood of a test * succeeding from empirical or other `hard' evidence, don't * make predictions. + * + * * These are meant to be used in places that are run `a lot'. + * It is wasteful to make predictions in code that is run + * seldomly (e.g. at subsystem initialization time) as the + * basic block reordering that this affects can often generate + * larger code. */ #if __GNUC_PREREQ__(2, 96) #define __predict_true(exp) __builtin_expect(((exp) != 0), 1)