From 03b4be77e50c01cd0463089e68bbe673362a897b Mon Sep 17 00:00:00 2001 From: johannst Date: Mon, 29 Aug 2022 20:27:58 +0000 Subject: deploy: 8de64474ded169db55cdd34be9c020ed13c4e5e7 --- development/gcc.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'development/gcc.html') diff --git a/development/gcc.html b/development/gcc.html index fa20808..107165d 100644 --- a/development/gcc.html +++ b/development/gcc.html @@ -75,7 +75,7 @@ @@ -161,6 +161,8 @@ gcc -march=native -Q --help=target

Give the compiler a hint which branch is hot, so it can lay out the code accordingly to reduce number of jump instructions. See on compiler explorer.

+

The semantics of this hint are as follows, the compiler prioritises expr == cond. So __builtin_expect(expr, 0) means that we expect the expr to be 0 +most of the time.

echo "
 extern void foo();
 extern void bar();
-- 
cgit v1.2.3