<div dir="ltr"><div>Hello Stefan, Ryan and all,</div><div><br></div><div>I checked the paper where I read it (unfortunately it was rejected) and the exact sentence was:<br></div><br><i>In some implementations (e.g. Dart [22] and PyPy [3]), object header and attribute storage can be separated, so the attribute storage can be relocated in order to grow. </i><br><i>[3]C. F. Bolz. <a href="http://morepypy.blogspot.fr/2010/11/efficiently-implementing-python-objects.html">Efficiently implementing objects with maps</a>, 2010. <br>[22]F. Schneider. <a href="https://www.dartlang.org/slides/2013/04/compiling-dart-to-efficient-machine-code.pdf">Compiling dart to efficient machine code</a>, 2012.</i><div><br></div><div>When I read F. Boltz. post, it looks like to me that in Pypy each instance of a class has a pointer to its map and its storage. The storage seems to be at a different location than the object&#39;s header and holds the instance variable values. To me it sounds very much like the object is &#39;split&#39; to be able to grow the storage if a new instance variable is added for a specific instance. Accessing an object instance variable requires an extra indirection through the storage pointer. Is there something I miss there ? It looks like the paper we wrote with Eliot could definitely apply there in order to speed up instance variable access by removing the indirection to the storage.</div><div><br></div><div>In the talk compiling dart to efficient machine code, one section deals about Javascript and V8. Objects are described in V8 (slide 29) as having a pointer to their Map, their properties and their elements, which to me sounds similar to Cincom Smalltalk design (the object header is separated from the value of the instance variables). However the talk then discusses the Dart implementation and it&#39;s not the case there. I guess I got confused as the talk is about Dart but this part of the talk is about Javascript. <br></div><div><br></div><div>I am waiting for other people comments but to me it looks like the memory representation where the object&#39;s header is separated from the the object&#39;s fields is used in Javascript V8 and Pypy, as explained in the 2 references, and that they could benefit from our implementation.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-08-14 9:51 GMT+02:00 Stefan Marr <span dir="ltr">&lt;<a href="mailto:smalltalk@stefan-marr.de" target="_blank">smalltalk@stefan-marr.de</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi Clément:<br>
<div><div class="h5"><br>
&gt; On 14 Aug 2015, at 08:41, Clément Bera &lt;<a href="mailto:bera.clement@gmail.com">bera.clement@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; 2015-08-14 4:29 GMT+02:00 Ryan Macnak &lt;<a href="mailto:rmacnak@gmail.com">rmacnak@gmail.com</a>&gt;:<br>
&gt;<br>
&gt;&gt; On Thu, Aug 13, 2015 at 1:19 AM, Clément Bera &lt;<a href="mailto:bera.clement@gmail.com">bera.clement@gmail.com</a>&gt; wrote:<br>
&gt;&gt; I heard recently that the implementation used by Cincom Smalltalk, splitting the object in 2 (header + fields), is also used in Pypy and the Dart VM as Python and Dart allow the user to add instance variables to objects at runtime which leads to the same problem.<br>
<br>
&gt; Objects are not split in the Dart VM, and it does not support adding instance variables or otherwise changing classes at runtime. Objects have a single-word header with a class index, size information and GC bits. Identity hashes are not often used in Dart, so they are kept in a side table.<br>
&gt;<br>
&gt; And I put &quot;accept&quot; on a paper that was claiming that... Damned. Any clue about Pypy ?<br>
<br>
</div></div>PyPy uses maps ala Self, but objects are not ‘split’.<br>
It is more or less the same as with V8, which also uses maps aka hidden classes.<br>
<br>
Best regards<br>
<span class="HOEnZb"><font color="#888888">Stefan<br>
<br>
<br>
--<br>
Stefan Marr<br>
Johannes Kepler Universität Linz<br>
<a href="http://stefan-marr.de/research/" rel="noreferrer" target="_blank">http://stefan-marr.de/research/</a><br>
<br>
<br>
<br>
</font></span></blockquote></div><br></div>