Added branch predictor hint.
This commit is contained in:
committed by
Matthew Parkinson
parent
5d711a2e65
commit
b484619f20
@@ -9,7 +9,11 @@
|
||||
# define ALWAYSINLINE __forceinline
|
||||
# define NOINLINE __declspec(noinline)
|
||||
# define HEADER_GLOBAL __declspec(selectany)
|
||||
# define likely(x) !!(x)
|
||||
# define unlikely(x) !!(x)
|
||||
#else
|
||||
# define likely(x) __builtin_expect(!!(x), 1)
|
||||
# define unlikely(x) __builtin_expect(!!(x), 0)
|
||||
# include <cpuid.h>
|
||||
# include <emmintrin.h>
|
||||
# define ALWAYSINLINE __attribute__((always_inline))
|
||||
|
||||
@@ -872,7 +872,7 @@ namespace snmalloc
|
||||
inline void handle_message_queue()
|
||||
{
|
||||
// Inline the empty check, but not necessarily the full queue handling.
|
||||
if (message_queue().is_empty())
|
||||
if (likely(message_queue().is_empty()))
|
||||
return;
|
||||
|
||||
handle_message_queue_inner();
|
||||
|
||||
Reference in New Issue
Block a user