title: Is it possible to use branch prediction hinting in C#?
body: <p>For example, I know it is defined for gcc and used in the Linux kernel as:</p>
  
  <pre><code>#define likely(x)       __builtin_expect((x),1)
  #define unlikely(x)     __builtin_expect((x),0)
  </code></pre>
  
  <p>If nothing like this is possible in C#, is the best alternative to manually reorder if-statements, putting the most likely case first? Are there any other ways to optimize based on this type of external knowledge?</p>
  
  <p>On a related note, the CLR knows how to identify guard clauses and assumes that the alternate branch will be taken, making this optimization inappropriate to use on guard clases, correct?</p>
  
  <p>(Note that I realize this may be a micro-optimization; I'm only interested for academic purposes.)</p>