<div dir="ltr">Thanks Ben,<div><br></div><div>the <primitive: 148> seems to fail something like 4-5 % with my bench (osx 10.11.6, the latest Pharo/Cog)</div><div><br></div><div>









<table border="0" cellpadding="0" cellspacing="0" width="328" style="border-collapse:collapse;width:246pt">

 <colgroup><col width="101" style="width:76pt">
 <col width="144" style="width:108pt">
 <col width="83" style="width:62pt">
 </colgroup><tbody><tr height="21" style="height:16pt">
  <td height="21" class="gmail-xl64" align="left" width="101" style="height:16pt;width:76pt">    # of copy calls </td>
  <td class="gmail-xl64" align="left" width="144" style="width:108pt">      Failing primitive 148 </td>
  <td class="gmail-xl64" align="left" width="83" style="width:62pt">    Failing rate</td>
 </tr>
 <tr height="21" style="height:16pt">
  <td height="21" align="right" style="height:16pt">1710</td>
  <td align="right">77</td>
  <td class="gmail-xl63" align="right">4,50%</td>
 </tr>
 <tr height="21" style="height:16pt">
  <td height="21" align="right" style="height:16pt">3049</td>
  <td align="right">133</td>
  <td class="gmail-xl63" align="right">4,36%</td>
 </tr>
 <tr height="21" style="height:16pt">
  <td height="21" align="right" style="height:16pt">51562</td>
  <td align="right">2947</td>
  <td class="gmail-xl63" align="right">5,72%</td>
 </tr>

</tbody></table><br></div><div>and it does not seem to fail at all with something like: </div><div><br></div><div>1 to: 1000 do: [:i |</div><div>    (1 to: 100000) asArray copy.</div><div>]</div><div><br></div><div>cheers</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 7, 2017 at 12:42 AM, Ben Coman <span dir="ltr"><<a href="mailto:btc@openinworld.com" target="_blank">btc@openinworld.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 7, 2017 at 3:05 AM, Ciprian Teodorov <span dir="ltr"><<a href="mailto:ciprian.teodorov@gmail.com" target="_blank">ciprian.teodorov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div dir="ltr">It is strange, to me it seems like the <primitive: 148> fails back to the smalltalk implementation (<span style="color:rgb(163,170,174);font-family:proxima-nova,"helvetica neue",helvetica,arial,sans-serif"><a href="http://bit.ly/2kjYdHv" target="_blank">http://bit.ly/2kjYdHv</a></span>).<div>However when trying to copy a small array like #(1 2 3 4) copy I cannot step-into the #shallowCopy</div><div>nor when I try to copy a big array like   (1 to: 100000) asArray copy</div><div><br></div><div>However, when I do cmd+. while running my bench the debugger stops in the shallowCopy</div><div><br></div><div>is this a debugger thing ? </div></div></blockquote><div><br></div><div>To check, can you add a transcript output next line after the primitive pragma?</div><div>cheers -ben</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>or the primitive really fails ? -- which can explain the > 2.6 slowdown</div><div><br></div><div>best regards,</div><div>cip</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 6, 2017 at 7:36 PM, Ciprian Teodorov <span dir="ltr"><<a href="mailto:ciprian.teodorov@gmail.com" target="_blank">ciprian.teodorov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks guys I'll will try with the latest version and I'll come back with updates.<div><br></div></div><div class="gmail_extra"><div><div class="m_3501436651478168952m_1027173320614192308h5"><br><div class="gmail_quote">On Sun, Feb 5, 2017 at 8:25 PM, tim Rowledge <span dir="ltr"><<a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> On 05-02-2017, at 5:08 AM, Clément Bera <<a href="mailto:bera.clement@gmail.com" target="_blank">bera.clement@gmail.com</a>> wrote:<br>
><br>
> I remember there was a discussion about that somewhere but I can't find it. I cc vm-dev they may have a clue.<br>
><br>
> When copying a pointer object in 64 bits instead of 32 bits, you need to copy twice many data, so it is going to be slower in any case.<br>
<br>
Err, not really. Probably. Assuming you have a 64 bit cpu etc, of course. And dependent on details of the memory architecture outside the cpu too - after all many systems do not need the memory chip organisation to match the cpu word size, having multiple lanes, burst read cache loading, even heterogenous regions (I suspect mostly in embedded systems for that, but y’never know).<br>
<br>
Yes, you’re moving twice as much stuff but it will still be a single read & write per word. After that you’re at the mercy of cache lines, write buffers, chip specs and not to mention the Hamsters.<br>
<br>
tim<br>
--<br>
tim Rowledge; <a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>; <a href="http://www.rowledge.org/tim" rel="noreferrer" target="_blank">http://www.rowledge.org/tim</a><br>
We can rescue a hostage or bankrupt a system. Now, what would you like us to do?<br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span>-- <br><div class="m_3501436651478168952m_1027173320614192308m_4811968603812865093gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><font color="#999999">Dr. Ciprian TEODOROV<br></font><font color="#999999">Enseignant-chercheur</font></div><div dir="ltr"><font color="#999999">ENSTA Bretagne<br><br>tél : 06 08 54 73 48</font><br><font color="#999999">mail : <a href="mailto:ciprian.teodorov@gmail.com" target="_blank">ciprian.teodorov@gmail.com</a><br><a href="http://www.teodorov.ro/" target="_blank">www.teodorov.ro</a></font></div></div></div></div></div></div>
</span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_3501436651478168952m_1027173320614192308gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><font color="#999999">Dr. Ciprian TEODOROV<br></font><font color="#999999">Enseignant-chercheur</font></div><div dir="ltr"><font color="#999999">ENSTA Bretagne<br><br>tél : 06 08 54 73 48</font><br><font color="#999999">mail : <a href="mailto:ciprian.teodorov@gmail.com" target="_blank">ciprian.teodorov@gmail.com</a><br><a href="http://www.teodorov.ro/" target="_blank">www.teodorov.ro</a></font></div></div></div></div></div></div>
</div>
<br></blockquote></div><br></div></div>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><font color="#999999">Dr. Ciprian TEODOROV<br></font><font color="#999999">Enseignant-chercheur</font></div><div dir="ltr"><font color="#999999">ENSTA Bretagne<br><br>tél : 06 08 54 73 48</font><br><font color="#999999">mail : <a href="mailto:ciprian.teodorov@gmail.com" target="_blank">ciprian.teodorov@gmail.com</a><br><a href="http://www.teodorov.ro/" target="_blank">www.teodorov.ro</a></font></div></div></div></div></div></div>
</div>