<div dir="ltr"><div><div><div><div>I&#39;ve published a change to accelerate mixed integer/float comparisons in COG (comparisons between float and int)<br></div>Search for COG issues at <a href="https://code.google.com/p/cog/issues/detail?id=41&amp;can=1&amp;q=float">https://code.google.com/p/cog/issues/detail?id=41&amp;can=1&amp;q=float</a><br>
</div><div>It might have been integrated in pharo VM, but not yet by Eliot in official cog VM<br></div><div><br></div>Now that I think of it, this is also one thing that changed in the image in 4.x series: (1/10) ~= 0.1<br>
</div>Comparisons used to convert Integer/Fraction to Float for comparison (exact -&gt; inexact), now it&#39;s the other way around Float-&gt;Fraction.<br></div><div>From there might come the bitShift...<br><br></div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/27 Herbert König <span dir="ltr">&lt;<a href="mailto:herbertkoenig@gmx.net" target="_blank">herbertkoenig@gmx.net</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi David,<br>
<br>
i checked with this VM and it is a VM issue.<br>
In the interpreter VM all images take very similar time while the new image with the Cog VM is dramatically slow with integer to float conversions.<br>
The snipped I sent in the other post is sufficient to show the effect.<br>
<br>
Thanks to all who gave me tips. I happily use the Cog VM with Float and get an improvement from above two minutes to 30 seconds without the tally.<br>
<br>
Cheers,<br>
<br>
Herbert<br>
<br>
Am <a href="tel:27.09.2013%2014" value="+12709201314" target="_blank">27.09.2013 14</a>:04, schrieb David T. Lewis:<div class="HOEnZb"><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It seems likely that the difference will be something in the image (4.4 versus<br>
3.8) as opposed to something in the VM (Cog versus interpreter). You should<br>
be able to confirm this by running the tests with an newer interpreter VM<br>
from <a href="http://squeakvm.org/win32/" target="_blank">http://squeakvm.org/win32/</a>. You can use that VM to run both the 3.8 and<br>
the 4.4 image.<br>
<br>
Assuming that the difference is related to the image, and if 4.4 with Cog<br>
is five times slower than 3.8 in your tests, then I would expect that 4.4<br>
with the interpreter should be about ten times (!) slower than 3.8 with<br>
the interpreter.<br>
<br>
If that is the case, then it should be easy to find the difference using<br>
a profiler. Andreas&#39; high performance profiler is currently available only<br>
for Cog, so you are limited to using use the normal profiler when running<br>
with interpreter VM. But if you can confirm that the issue is in the image,<br>
then you can use Cog with Andreas profiler to do the detailed profiling.<br>
<br>
Dave<br>
<br>
<br>
On Fri, Sep 27, 2013 at 12:26:32PM +0200, Herbert K?nig wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Folks,<br>
<br>
I&#39;m doing some simulation in Squeak 3.8 and as some tests ran over two<br>
minutes I decided to try a more recent image with cog vm.<br>
<br>
To my surprise 4.4 took around 5 times as long as 3.8. I believe I do<br>
nothing out of the ordinary here. Time is spent in:<br>
24% SmallInteger&gt;&gt;negative; 22% SmallInteger&gt;&gt;bitShift: (I don&#39;t use<br>
bitShift: explicitly) and 20% Array&gt;&gt; collect:<br>
<br>
Which image and VM should I use to verify this before sending the<br>
complete message tallies?<br>
<br>
Cheers<br>
<br>
Herbert<br>
<br>
I used the following recent image / vm:<br>
Image<br>
-----<br>
C:\daten\Squeak\4_4Dev\<u></u>Squeak4.4-DCSE.image<br>
Squeak4.4<br>
latest update: #12333<br>
Current Change Set: Knacken mit APX<br>
Image format 6505 (32 bit)<br>
<br>
Virtual Machine<br>
---------------<br>
C:\daten\Squeak\4_4Dev\Squeak.<u></u>exe<br>
Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.302]<br>
Win32 built on Jul 15 2013 15:35:13 Compiler: 3.4.4 (cygming special,<br>
gdc 0.12, using dmd 0.125)<br>
platform sources revision VM: r2749<br>
<a href="http://www.squeakvm.org/svn/squeak/branches/Cog" target="_blank">http://www.squeakvm.org/svn/<u></u>squeak/branches/Cog</a> Plugins: r2545<br>
<a href="http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins" target="_blank">http://squeakvm.org/svn/<u></u>squeak/trunk/platforms/Cross/<u></u>plugins</a><br>
CoInterpreter VMMaker.oscog-eem.302 uuid:<br>
2ac39432-ac54-4584-964e-<u></u>b129c90792f4 Jul 15 2013<br>
StackToRegisterMappingCogit VMMaker.oscog-eem.302 uuid:<br>
2ac39432-ac54-4584-964e-<u></u>b129c90792f4 Jul 15 2013<br>
</blockquote></blockquote>
<br>
<br>
</div></div></blockquote></div><br></div>