title: Which is generally faster, a yield or an append?
body: <p>I am currently in a personal learning project where I read in an XML database. I find myself writing functions that gather data and I'm not sure what would be a fast way to return them.</p>
  
  <p>Which is generally faster:</p>
  
  <ol>
  <li><code>yield</code>s, or  </li>
  <li>several <code>append()</code>s within the function then <code>return</code> the ensuing <code>list</code>?</li>
  </ol>
  
  <p>I would be happy to know in what situations where <code>yield</code>s would be faster than <code>append()</code>s or vice-versa.</p>