<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Proposed wording for likely and unlikely attributes (Revision 4)</title>

<style type="text/css">
html {
  font-family: sans-serif;
  line-height: 1.25em;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 10px;
  padding: 0;
  counter-reset: end_note_counter;
}

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

pre {
  font-family: monospace, monospace;
  font-size: .9em;
  background-color: #f3f3f3;
  padding: 1em;
}

code{
  font-family: monospace, monospace;
  font-size: 1em;
  background-color: #f3f3f3;
}

table {
  border-collapse: collapse;
  margin-bottom: 1em;
}

table, th, td {
  border: 1px solid #000;
}

th, td {
  text-align: left;
  padding: 0 .4em;
  font-size: .9em;
}

tr.stripe {
  background-color: #f3f3f3;
}

span.foot:before {
  font-size: smaller;
  margin-left: .3em;
  vertical-align: super;
  line-height: 0;
  counter-increment: end_note_counter;
  content: "[" counter(end_note_counter) "]";
}

ins { 
  text-decoration:none; 
  background-color:#A0FFA0 
}

.mono {
  font-family: monospace, monospace;
}

</style>

</head>
<body>
Document number: P0479R4<br/>
Date: 2018-02-07<br/>
Audience: Core Working Group, SG14<br/>
Reply-to: Clay Trychta &lt;clay.trychta@gmail.com&gt;<br/>

<h1>Proposed wording for likely and unlikely attributes (Revision 4)</h1> 

<h2 id="wording">Wording</h2>

<blockquote>

<p>
<ins>10.6.N Likelihood attributes [dcl.attr.likelihood]</ins>
</p>

<p>
<ins>
The <em>attribute-token</em>s <span class="mono"><strong>likely</strong></span> and <span class="mono"><strong>unlikely</strong></span> may be applied to statements.  The <em>attribute-token</em>s <span class="mono"><strong>likely</strong></span> and <span class="mono"><strong>unlikely</strong></span>  shall appear at most once in each attribute-list and no attribute-argument-clause shall be present. The <span class="mono"><strong>likely</strong></span> attribute is not allowed to appear in the same attribute-list as the <span class="mono"><strong>unlikely</strong></span> attribute. 
</ins>
</p>

<p>
<ins>
[<em>Note:</em> 
The use of the <span class="mono"><strong>likely</strong></span> attribute on a statement is intended to allow implementations to optimize for the case where paths of execution including that statement are arbitrarily more likely than any alternative path of execution that does not include such a statement.

The use of the <span class="mono"><strong>unlikely</strong></span> attribute on a statement is intended to allow implementations to optimize for the case where paths of execution including that statement are arbitrarily more unlikely than any alternative path of execution that does not include such a statement.  

Excessive usage of either of these attributes is liable to result in performance degradation.    

<em>&mdash; end note</em>]
</ins>
</p>

</blockquote>

<h2 id="acknowledgements">Acknowledgements</h2>
Thank you to Chandler Carruth, Andrew Pardoe, Davis Herring, John McFarlane, Bartosz Bielecki, Carl Cook, Matt Dziubinski, Mathias Gaunard, Paul Hampson, and others in SG14 for sharing their insights and suggestions.

</body>
</html>

