<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#330033">
    <div class="moz-cite-prefix">On 1/20/2016 10:36 AM, Maciej
      Fijalkowski wrote:<br>
    </div>
    <blockquote
cite="mid:CAK5idxTGiE=Y0R_T0j=c4H=1n_DJ1a35mwyhk=unKZOZo2k4xg@mail.gmail.com"
      type="cite">
      <blockquote type="cite" style="color: #000000;">
        <pre wrap="">Why can't you simply use the id of the dict object as the globally unique
<span class="moz-txt-citetags">> </span>dict ID? It's already globally unique amongst all Python objects which makes
<span class="moz-txt-citetags">> </span>it inherently unique amongst dicts.
<span class="moz-txt-citetags">></span>
<span class="moz-txt-citetags">> </span>_______________________________________________
<span class="moz-txt-citetags">> </span>Python-Dev mailing list
<span class="moz-txt-citetags">> </span><a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Python-Dev@python.org">Python-Dev@python.org</a>
<span class="moz-txt-citetags">> </span><a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://mail.python.org/mailman/listinfo/python-dev">https://mail.python.org/mailman/listinfo/python-dev</a>
<span class="moz-txt-citetags">> </span>Unsubscribe:
<span class="moz-txt-citetags">> </span><a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://mail.python.org/mailman/options/python-dev/fijall%40gmail.com">https://mail.python.org/mailman/options/python-dev/fijall%40gmail.com</a>
<span class="moz-txt-citetags">></span>
</pre>
      </blockquote>
      <pre wrap="">Brett, you need two things - the ID of the dict and the version tag.
What we do in pypy is we have a small object (called, surprisingly,
VersionTag()) and we use the ID of that. That way you can change the
version id of an existing dict and have only one field.</pre>
    </blockquote>
    For the reuse case, can't you simply keep the ma_version "live" in
    dict items on the free list, rather than starting over at
    (presumably) 0 ?  Then if the dict is reused, it bumps the
    ma_version, and the fallback code goes on with (presumably)
    relocating the original dict (oops, it's gone), and dealing with the
    fallout.<br>
    <br>
    Then you can use the regular dict id as the globally unique dict
    id?  And only need the one uint64, rather than a separately
    allocated extra pair of uint64?<br>
  </body>
</html>