<div dir="ltr"><div>Hi.</div>I measure latest VM with shallowCopy support. Copy now is much better:<div><br></div><div><div>object := 10@20.</div><div>3 timesRepeat: [ Smalltalk garbageCollect ].</div><div>result1 := [ Point x: 10 y: 20 ] benchFor: 10 seconds.</div><div><br></div><div>3 timesRepeat: [ Smalltalk garbageCollect ].</div><div>result2 := [ object shallowCopy ] benchFor: 10 seconds.</div><div>{result1. result2}.</div><div><br></div><div>&quot;a BenchmarkResult(310,321,301 iterations in 10 seconds 2 milliseconds. 31,025,925 per second) </div><div>a BenchmarkResult(426,311,468 iterations in 10 seconds 3 milliseconds. 42,618,361 per second)&quot; <br></div></div><div><br></div><div>But with &quot;Point basicNew&quot; it is almost same:</div><div><br></div><div> &quot;a BenchmarkResult(402,708,088 iterations in 10 seconds 2 milliseconds. 40,262,756 per second) </div><div>a BenchmarkResult(405,145,766 iterations in 10 seconds 3 milliseconds. 40,502,426 per second)&quot;<br></div><div><br></div><div>It also improves my veryDeepCopy test which works better on preSpur VM. (preSpur VM is still better):<br></div><div><br></div><div><div>m := Morph new.</div><div>r2 := [ m veryDeepCopy  ] benchFor: 10 seconds. </div><div><br></div><div>&quot;a BenchmarkResult(34,007 iterations in 10 seconds 3 milliseconds. 3,400 per second)&quot; - no shallow copy optimization<br></div><div><br></div><div>&quot;a BenchmarkResult(43,333 iterations in 10 seconds 1 millisecond. 4,333 per second)&quot; - latest VM with shallow copy.</div><div><br></div><div>&quot;a BenchmarkResult(52,985 iterations in 10 seconds 1 millisecond. 5,298 per second)&quot; - preSpur VM</div><div><br></div></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-01 19:32 GMT+02:00 tim Rowledge <span dir="ltr">&lt;<a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
&gt; On 01-08-2016, at 12:58 AM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; Hi John,<br>
&gt;<br>
&gt;&gt; On Jul 31, 2016, at 7:32 AM, John McIntosh &lt;<a href="mailto:johnmci@smalltalkconsulting.com">johnmci@smalltalkconsulting.<wbr>com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; So has anyone thought about pre-allocating a few commonly used objects during idle time?  Then grabbing that object and filling in the actual details when one is needed. The Squeak VM did that for method context (and recycled them).<br>
&gt;<br>
&gt; Thus only works to the extent that a particular kind if object us allocated all the time and to the extent that synthesizing an object is relatively expensive relative to filling in its slots.  This works for contexts above a complex object representation.  In my experience it doesn&#39;t work for floats either. But Cog does not allocate contexts often because of context-to-stack mapping and because the Spur object representation is simple, regular and very quick to synthesize (allocate).<br>
<br>
</span>Yeah but with a 64-bit address space we could pre-allocate *millions* of objects of every class! And speculatively initialise them!<br>
<br>
Oh, wait; what do you mean we don’t have 17,592,186,044,416Mb ram in our Raspberry Pi’s yet?<br>
<br>
<br>
tim<br>
--<br>
tim Rowledge; <a href="mailto:tim@rowledge.org">tim@rowledge.org</a>; <a href="http://www.rowledge.org/tim" rel="noreferrer" target="_blank">http://www.rowledge.org/tim</a><br>
Useful random insult:- A one-bit brain with a parity error.<br>
<br>
<br>
</blockquote></div><br></div>