<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    <div class="moz-cite-prefix">On 6/11/15 1:39 PM, Dolph Mathews
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAC=h7gVbBrCWWmk2_ZxOuc=j4PTYtZRVY23Kwjg11i1E2VxxmQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Thu, Jun 11, 2015 at 12:34 AM,
            Robert Collins <span dir="ltr"><<a
                moz-do-not-send="true"
                href="mailto:robertc@robertcollins.net" target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:robertc@robertcollins.net">robertc@robertcollins.net</a></a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span
                class="">On 11 June 2015 at 17:16, Robert Collins <<a
                  moz-do-not-send="true"
                  href="mailto:robertc@robertcollins.net"><a class="moz-txt-link-abbreviated" href="mailto:robertc@robertcollins.net">robertc@robertcollins.net</a></a>>
                wrote:<br>
                <br>
                > This test conflates setup and execution. Better
                like my example,<br>
              </span>...<br>
              <br>
              Just had it pointed out to me that I've let my inner
              asshole out again<br>
              - sorry. I'm going to step away from the thread for a bit;
              my personal<br>
              state (daughter just had a routine but painful operation)
              shouldn't be<br>
              taken out on other folk, however indirectly.<br>
            </blockquote>
            <div><br>
            </div>
            <div>Ha, no worries. You are completely correct about
              conflating setup and execution. As far as I can tell
              though, even if I isolate the dict setup from the
              benchmark, I get the same relative differences in results.
              iteritems() was introduced for a reason!</div>
            <div><br>
            </div>
            <div>If you don't need to go back to .items()'s copy
              behavior in py2, then six.iteritems() seems to be the best
              general purpose choice.</div>
          </div>
        </div>
      </div>
    </blockquote>
    I am firmly in the "let's use items()" camp.  A 100 ms difference
    for a totally not-real-world case of a dictionary 1M items in size
    is no kind of rationale for the Openstack project - if someone has a
    dictionary that's 1M objects in size, or even 100K, that's a bug in
    and of itself.   <br>
    <br>
    the real benchmarks we should be using, if we are to even bother at
    all (which we shouldn't), is to observe if items() vs. iteritems()
    has *any* difference that is at all measurable in terms of the
    overall execution of real-world openstack use cases.   These
    nano-differences in speed are immediately dwarfed by all those
    operations surrounding them long before we even get to the level of
    RPC overhead.<br>
    <br>
    <br>
    <br>
    <blockquote
cite="mid:CAC=h7gVbBrCWWmk2_ZxOuc=j4PTYtZRVY23Kwjg11i1E2VxxmQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div><br>
            </div>
            <div>I think Gordon said it best elsewhere in this thread:</div>
            <div><br>
            </div>
            <div>> <span style="font-size:12.8000001907349px">again,
                i just want to reiterate, i'm not saying don't use
                items(), i just think we should not blindly use items()
                just as we shouldn't blindly use iteritems()/viewitems()</span></div>
          </div>
        </div>
      </div>
    </blockquote>
    If a demonstrable difference can be established in terms of
    real-world use cases for code that is using iteritems() vs. items(),
    then you can justify this difference.  Otherwise, not worth it.<br>
    <br>
    <br>
    <br>
    <br>
    <blockquote
cite="mid:CAC=h7gVbBrCWWmk2_ZxOuc=j4PTYtZRVY23Kwjg11i1E2VxxmQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
              <div class="">
                <div class="h5"><br>
                  -Rob<br>
                  <br>
                  --<br>
                  Robert Collins <<a moz-do-not-send="true"
                    href="mailto:rbtcollins@hp.com">rbtcollins@hp.com</a>><br>
                  Distinguished Technologist<br>
                  HP Converged Cloud<br>
                  <br>
__________________________________________________________________________<br>
                  OpenStack Development Mailing List (not for usage
                  questions)<br>
                  Unsubscribe: <a moz-do-not-send="true"
href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe"
                    rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
                  <a moz-do-not-send="true"
                    href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev"
                    rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: <a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>