<div dir="ltr">Levente,<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 13, 2015 at 1:35 PM, Levente Uzonyi <span dir="ltr">&lt;<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Eliot,<br>
<br>
I made many of the Shootout tests work[1] (including those which rely on Regex), and rewrote some of them to use Squeak-specific optimizations instead of VW-specific ones.<br>
I know the latter may be something you don&#39;t want to have, but the Regex version in the Inbox[2] is (or at least it should be) compatible with the Shootout benchmarks.<br></blockquote><div><br></div><div>Great!  Where were you yesterday ? :-).  I spent yesterday getting my own version of these somewhat working only to find that you&#39;ve done the complete job.  Thanks you!!</div><div><br></div><div>BTW, here&#39;s the data I get on a 2.3GHz Core i7 MacMini comparing the latest Spur against vw7.7</div><div><br></div><div>#(<span class="Apple-tab-span" style="white-space:pre">        </span>46.25857966666666<span class="Apple-tab-span" style="white-space:pre">                </span>&quot;total time to run suite on 7.7nc&quot;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>26.88<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;total time to run suite on Spur r3420&quot;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>1.7209293030753967<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;ratio Spur vs 7.7&quot;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>-41.89186050740468<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;% speedup of Spur relative to 7.7&quot;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;benchmark&quot; <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;ratio&quot;<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;% change, new - old / old * 100&quot;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>#(<span class="Apple-tab-span" style="white-space:pre">        </span>#(#binarytrees<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>1.99<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>-49.77)</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>#(#chameneosredux2<span class="Apple-tab-span" style="white-space:pre">        </span>3.52<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>-71.62)</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>#(#fannkuchredux<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>0.82<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>21.59)</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>#(#fastaredux<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>1.27<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>-21.22)</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>#(#mandelbrot2<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>2.6<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>-61.54)</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>#(#meteor<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>1.09<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>-8.26)</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>#(#pidigits4<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>1.4<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>-28.54)</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>#(#spectralnorm2<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>1.20<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>-16.76)))</div><div><br></div><div>Good numbers :-)</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Evaluating<br>
<br>
        ShootoutTests runAllToDummyStreamVs: ShootoutTests referenceTimesForVW<br>
<br>
I get the following:<br>
<br>
{[self binarytrees: 16 to: stream]}<br>
 took 1.441 seconds<br>
ratio: 0.597   % change: -40.331%<br>
<br>
{[self chameneosredux: 600000 to: stream]}<br>
 took 2.083 seconds<br>
ratio: 0.42   % change: -58.038%<br>
<br>
{[self fannkuchRedux: 10 to: stream]}<br>
 took 3.362 seconds<br>
ratio: 0.896   % change: -10.371%<br>
<br>
{[self fasta: 2500000 to: stream]}<br>
 took 5.794 seconds<br>
ratio: 1.199   % change: 19.934%<br>
<br>
{[self fastaRedux: 2500000 to: stream]}<br>
 took 2.281 seconds<br>
ratio: 0.627   % change: -37.318%<br>
<br>
{[self mandelbrot3: 1000 to: stream]}<br>
 took 1.26 seconds<br>
ratio: 0.311   % change: -68.943%<br>
<br>
{[self meteor: 2098 to: stream]}<br>
 took 0.415 seconds<br>
ratio: 0.769   % change: -23.148%<br>
<br>
{[self nbody: 500000 to: stream]}<br>
 took 1.076 seconds<br>
ratio: 0.332   % change: -66.8%<br>
<br>
{[self<br>
                pidigitsTo: 2000<br>
                width: 10<br>
                to: stream]}<br>
 took 0.859 seconds<br>
ratio: 0.795   % change: -20.463%<br>
<br>
{[self regexDNA: fasta50000 to: stream]}<br>
 took 3.729 seconds<br>
ratio: 0.533   % change: -46.668%<br>
<br>
{[self reverseComplement: fasta2500000 to: stream]}<br>
 took 0.177 seconds<br>
ratio: 0.058   % change: -94.231%<br>
<br>
{[self spectralnorm: 500]}<br>
 took 0.594 seconds<br>
ratio: 0.607   % change: -39.264%<br>
<br>
{[self threadring: 5000000 to: stream]}<br>
 took 1.655 seconds<br>
ratio: 0.341   % change: -65.89%<br>
geometric mean &#39;0.478&#39;   average speedup &#39;-52.212&#39;%<br>
<br>
This comparison is unfair of course, because the reference numbers are from a different machine and they use a dummy stream, but it&#39;s still useful to make estimates.<br></blockquote><div><br></div><div>Yes.  Testing to the dummy stream is useful for profiling where one wants to focus on the cost of the algorithm.  But having the framework be flexible is useful.  Especially making it easy to compare against different baselines, e.g. VW, Cog V3, Interpreter V3, etc,</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Levente<br>
<br>
[1] <a href="http://leves.web.elte.hu/squeak/Shootout-ul.18.mcz" rel="noreferrer" target="_blank">http://leves.web.elte.hu/squeak/Shootout-ul.18.mcz</a><br>
[2] <a href="http://source.squeak.org/inbox/Regex-Core-ul.37.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox/Regex-Core-ul.37.mcz</a></blockquote><div><br></div><div>Great, thanks!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On Thu, 13 Aug 2015, Eliot Miranda wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi All,<br>
    I had occasion to compare VW (vw7.7nc) and Spur recently and was pleasantly surprised to see that Spur is on average -40% faster than VW on a large subset of the benchmarks from the shootout (I didn&#39;t<br>
include three because of Regex syntax issues).  Now Spur gets some of its speed from having direct pointers vs VisualWorks&#39; object header/table indirection, but it could get other speedups from various other<br>
differences.  It would be great to know exactly how much speedup comes from what, and indeed how much cost Sour pays for its lazy become:.  I&#39;d like to propose a project to exactly determine the costs of an<br>
explicit read barrier and of lazy forwarding compared to no check at all.<br>
<br>
Spur, part of VMMaker.oscog, is implemented by a hierarchy of classes that implement a 32-bit and a 64-bit memory manager.  Spur is a sibling to the old ObjectMemory class that implements the V3 object<br>
representation.  The current Spur does &quot;lazy forwarding&quot; where two objects are become by cloning each object, making the old versions point to the opposite copy, and relying on send-time checks to lazily<br>
follow forwarding pointers when sends to forwarded objects fail a message lookup.<br>
<br>
The project would create two additional variations on Spur, both of which dispense with the lazy check.  One would explicitly test for a forwarding pointers on every access, and one would never check, not<br>
need send-time checking either and would reimplement become: like the old ObjectMemory, by scanning the entire heap to exchange all references.<br>
<br>
These variations could be implemented as subclasses or siblings of Spur.  The project isn&#39;t trivial because it also means making changes to the JIT, albeit within its framework for multiple object<br>
representations.  Because this is probably some months&#39; work I can&#39;t do it myself but I&#39;m extremely interested in the results and I think it would make a really good paper, e.g. for ISMM, or one of the<br>
dynamic language workshops.<br>
<br>
If what I&#39;ve said makes any sense at all to any academics out there who are looking for a challenging but nicely contained and far from open ended Masters project then please get in touch and we can see if we<br>
can take this any further.<br>
<br>
_,,,^..^,,,_<br>
best, Eliot<br>
<br>
</blockquote>
<br><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>