<div dir="ltr">Henrik, Levente, David,<div><br></div><div>    thank you so much for this.  Henrik, indeed it is the XCHG instruction that slows things down.  Here&#39;s a rough before and after measure, a huge difference!</div><div><br></div><div><div>----QUIT----{15 May 2015 . 8:46:55 am} trunk4.6.image priorSource: 21959994</div><div>(1 to: 10) do: [:i| Transcript cr; print: 0 tinyBenchmarks; flush]</div><div>&#39;225948808 bytecodes/sec; 15841140 sends/sec&#39;</div><div>&#39;226749335 bytecodes/sec; 16492340 sends/sec&#39;</div><div>&#39;247821878 bytecodes/sec; 16536674 sends/sec&#39;</div><div>&#39;239252336 bytecodes/sec; 18218093 sends/sec&#39;</div><div>&#39;279628618 bytecodes/sec; 17426750 sends/sec&#39;</div><div>&#39;249269717 bytecodes/sec; 17848093 sends/sec&#39;</div><div>&#39;254220456 bytecodes/sec; 16581247 sends/sec&#39;</div><div>&#39;270184696 bytecodes/sec; 18146439 sends/sec&#39;</div><div>&#39;233576642 bytecodes/sec; 17056311 sends/sec&#39;</div><div>&#39;230008984 bytecodes/sec; 17848093 sends/sec&#39;</div><div>----QUIT----{20 May 2015 . 10:27:31 am} trunk4.6.image priorSource: 21960768</div><div>&#39;612074118 bytecodes/sec; 92940463 sends/sec&#39;</div><div>&#39;614277144 bytecodes/sec; 89647038 sends/sec&#39;</div><div>&#39;634448574 bytecodes/sec; 88517824 sends/sec&#39;</div><div>&#39;632098765 bytecodes/sec; 93145781 sends/sec&#39;</div><div>&#39;638006230 bytecodes/sec; 85932045 sends/sec&#39;</div><div>&#39;632098765 bytecodes/sec; 91660848 sends/sec&#39;</div><div>&#39;641604010 bytecodes/sec; 93145781 sends/sec&#39;</div><div>&#39;623250152 bytecodes/sec; 91132543 sends/sec&#39;</div><div>&#39;636815920 bytecodes/sec; 92195314 sends/sec&#39;</div><div>&#39;589522164 bytecodes/sec; 80877219 sends/sec&#39;</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 20, 2015 at 5:41 AM, Henrik Johansen <span dir="ltr">&lt;<a href="mailto:henrik.s.johansen@veloxit.no" target="_blank">henrik.s.johansen@veloxit.no</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div style="word-wrap:break-word">Could it be related to the change in 1166 to use XCHG between register/mem locations instead of a MOV to a (now unavailable) temp register in genPushRegisterArgsForNumArgs:?<div>According to <a href="http://www.agner.org/optimize/instruction_tables.pdf" target="_blank">http://www.agner.org/optimize/instruction_tables.pdf</a> , XCHG with m/r operands has major penalties on most platforms compared to m/r MOV, which would be a problem if it&#39;s used for a large percent of sends...</div><div><br></div><div>Cheers,</div><div>Henry</div><div><br><div><blockquote type="cite"><div>On 20 May 2015, at 3:07 , David T. Lewis &lt;<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>&gt; wrote:</div><br><div><br>The generated source files have a comment block that indicate the VMMaker<br>sources from which they were generated. The SVN 3306 src files came from<br>VMMaker.oscog-eem.1155, and the SVN 3308 src files were generated from<br>VMMaker.oscog-eem.1178. The changes that produce the performances difference<br>will be found somewhere in the VMMaker commits it that range.<br><br>Dave<br><br><br>On Tue, May 19, 2015 at 10:40:15PM +0200, Levente Uzonyi wrote:<br><blockquote type="cite"><br>And after that I checked out 3308 of src, and rebuilt the VM again:<br><br>&#39;934306569 bytecodes/sec; 46368169 sends/sec&#39;<br><br>The files which were changed from 3306 to 3308 are:<br><br>U    src/vm/cointerp.c<br>U    src/vm/cointerpmt.c<br>U    src/vm/cogit.c<br>U    src/vm/cointerp.h<br>U    src/vm/gcc3x-cointerp.c<br>U    src/vm/cointerpmt.h<br>U    src/vm/gcc3x-cointerpmt.c<br>U    src/vm/cogit.h<br>U    src/plugins/QuicktimePlugin/QuicktimePlugin.c<br><br>Levente<br><br>On Tue, 19 May 2015, Levente Uzonyi wrote:<br><br><blockquote type="cite"><br>The difference is somewhere in the sources. I just checked out revision <br>3306 of the src directory, and rebuilt a CogVM (ht one, and kept the <br>platform files at 3345. I used some extra CFLAGS which are responsible for <br>the higher bytecodes/sec, ignore that.). It gives the following:<br><br>&#39;941176470 bytecodes/sec; 122927085 sends/sec&#39;<br><br>While 3343 gives:<br><br>&#39;896672504 bytecodes/sec; 46102703 sends/sec&#39;<br><br>Levente<br><br></blockquote></blockquote></div></blockquote></div><br></div></div><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div>