Re: [PATCH 2/8] opensm/complib: define "if" statements with branch prediction hints
From: Jason Gunthorpe <hidden>
Date: 2012-08-14 21:54:13
From: Jason Gunthorpe <hidden>
Date: 2012-08-14 21:54:13
On Tue, Aug 14, 2012 at 09:39:23PM +0000, Hefty, Sean wrote:
quoted
+#define if_PF(cond) if(CL_PREDICT_FALSE(cond)) +#define if_PT(cond) if(CL_PREDICT_TRUE(cond))If CL_PREDICT_TRUE/FALSE are too long, why not just shorten those, rather than abstract if statements behind a macro?
If you are typing these so often (ie more than in some datastructure kernels) that the length is a problem then you really should be using profile guided optimization instead... Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html