title: Overhead of std::optional<T>?
body: <p>Now that <a href="http://en.cppreference.com/w/cpp/experimental/optional" rel="noreferrer">std::experimental::optional</a> has been accepted (or is about to be accepted), I wonder what is the overhead and the consequences on the assembly generated when the inner value is get by the following operators :</p>
  
  <pre><code>-&gt;
  *
  value
  value_or
  </code></pre>
  
  <p>compared to the case without <code>std::optional</code>. It could be particularly important for computationaly intensive programs. </p>
  
  <p>For example, what would be order of magnitude of the overhead on operations on a <code>std::vector&lt;std::experimental::optional&lt;double&gt;&gt;</code> compared to a <code>std::vector&lt;double&gt;</code> ?</p>