+#if __GNUC__
+#define FOLLY_DETAIL_BUILTIN_EXPECT(b, t) (__builtin_expect(b, t))
+#else
+#define FOLLY_DETAIL_BUILTIN_EXPECT(b, t) b
+#endif
+
+// Likeliness annotations
+//
+// Useful when the author has better knowledge than the compiler of whether
+// the branch condition is overwhelmingly likely to take a specific value.
+//
+// Useful when the author has better knowledge than the compiler of which code
+// paths are designed as the fast path and which are designed as the slow path,
+// and to force the compiler to optimize for the fast path, even when it is not
+// overwhelmingly likely.
+
+#define FOLLY_LIKELY(x) FOLLY_DETAIL_BUILTIN_EXPECT((x), 1)
+#define FOLLY_UNLIKELY(x) FOLLY_DETAIL_BUILTIN_EXPECT((x), 0)
+
+// Un-namespaced annotations
+