diff --git a/src/common.h b/src/common.h index 41322c5f..fc56c1cb 100644 --- a/src/common.h +++ b/src/common.h @@ -203,4 +203,8 @@ extern FILE *error_log; } while (0) #endif +// branch prediction +#define LIKELY(x) __builtin_expect((x), true) +#define UNLIKELY(x) __builtin_expect((x), false) + #endif // whole file