From 984dc80a022f3e8f6a6187dbd75cd910fcb2b83e Mon Sep 17 00:00:00 2001 From: dwight Date: Mon, 11 Jul 2011 09:31:33 -0400 Subject: prep for some compiler hinting in the future --- server.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 server.h (limited to 'server.h') diff --git a/server.h b/server.h new file mode 100644 index 00000000000..066b87db989 --- /dev/null +++ b/server.h @@ -0,0 +1,23 @@ +/** @file server.h + + This file contains includes commonly needed in the server files (mongod, mongos, test). It is NOT included in the C++ client. + + Over time we should move more here, and more out of pch.h. And get rid of pch.h at some point. +*/ + +// todo is there a boost thign for this already? + +#pragma once + +#include "bson/inline_decls.h" + +/* Note: do not clutter code with these -- ONLY use in hot spots / significant loops. */ + +// branch prediction. indicate we expect to enter the if statement body +#define IF MONGOIF + +// branch prediction. indicate we expect to not enter the if statement body +#define _IF MONGO_IF + +// prefetch data from memory +#define PREFETCH MONGOPREFETCH -- cgit v1.2.1