<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font face="Georgia">FWIW, I reran my 3 tests and the gap in the 2
      interpreter versions narrowed, but old is still faster. And I
      still can't guess why a pure float compare is slower than a
      float-int compare.<br>
      <br>
      Cheers,<br>
      Bob<br>
      <br>
      Squeak3.2gamma(interp 3.8.12)<br>
      1 &lt; 1.0 = #(507 506 500)<br>
      1.0 &lt; 1.0 = #(764 776 768)<br>
      1 &lt; 1 = #(230 234 238)<br>
      1.0 &lt; 1 = #(501 503 496)<br>
      <br>
      Squeak4.5 (cog)<br>
      1 &lt; 1.0 = #(23562 28802 28797)<br>
      1.0 &lt; 1.0 = #(122 122 125)<br>
      1 &lt; 1 = #(87 91 90)<br>
      1.0 &lt; 1 = #(151 149 149)<br>
      <br>
      Squeak4.5(interp 5.7.4.1)<br>
      1 &lt; 1.0 = #(618 612 605)<br>
      1.0 &lt; 1.0 = #(845 845 856)<br>
      1 &lt; 1 = #(269 272 269)<br>
      1.0 &lt; 1 = #(586 581 591)<br>
      <br>
      <br>
    </font>
    <div class="moz-cite-prefix">On 9/27/13 9:08 PM, David T. Lewis
      wrote:<br>
    </div>
    <blockquote cite="mid:20130928010812.GA46475@shell.msen.com"
      type="cite">
      <pre wrap="">On Fri, Sep 27, 2013 at 05:51:33PM -0400, Bob Arning wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">I thought I'd extend the test to an older squeak&amp;vm

---interpreter vm (3.8.12) squeak 3.2 ---------
Float compareTiming: 1 to: 1.0 ==&gt; 496
Float compareTiming: 1.0 to: 1.0 ==&gt; 761
Float compareTiming: 1 to: 1 ==&gt; 225
Float compareTiming: 1.0 to: 1 ==&gt; 494
---interpreter vm (5.7.4.1) squeak 4.5 ---------
Float compareTiming: 1 to: 1.0 ==&gt; 719
Float compareTiming: 1.0 to: 1.0 ==&gt; 991
Float compareTiming: 1 to: 1 ==&gt; 312
Float compareTiming: 1.0 to: 1 ==&gt; 686

The old one wins.

Cheers,
Bob
</pre>
      </blockquote>
      <pre wrap="">
(CC to vm-dev list)

I get different results on my Linux PC.

- Squeak 3.2 with interpreter VM compiled by Ian, circa 2006:

        Float compareTiming: 1 to: 1.0 ==&gt; 1041
        Float compareTiming: 1.0 to: 1.0 ==&gt; 1432
        Float compareTiming: 1 to: 1 ==&gt; 390
        Float compareTiming: 1.0 to: 1 ==&gt; 1108

- Squeak 4.4 with Ian's 4.4.7-2357 VM, circa 2012:

        Float compareTiming: 1 to: 1.0 ==&gt; 840
        Float compareTiming: 1.0 to: 1.0 ==&gt; 1176
        Float compareTiming: 1 to: 1 ==&gt; 420
        Float compareTiming: 1.0 to: 1 ==&gt; 836

- Squeak 4.4 with my locally compiled 4.12.6.2787 VM (because I cannot use
  Ian's 4.10.2.2614 from squeakvm.org due to a Linux glib compatibility
  problem for the outdated Linux on my PC):

        Float compareTiming: 1 to: 1.0 ==&gt; 782
        Float compareTiming: 1.0 to: 1.0 ==&gt; 1077
        Float compareTiming: 1 to: 1 ==&gt; 461
        Float compareTiming: 1.0 to: 1 ==&gt; 789

Perhaps there are other factors on the Mac platform (compiler changes,
etc) that are affecting the performance. Could you try Squeak 4.4 with
Ian's unix Mac VM from squeakvm.org and see if you get different results?

  <a class="moz-txt-link-freetext" href="http://squeakvm.org/unix/release/Squeak-4.10.2.2614-darwin10.8.0_i386.tar.gz">http://squeakvm.org/unix/release/Squeak-4.10.2.2614-darwin10.8.0_i386.tar.gz</a>

Dave


</pre>
      <blockquote type="cite">
        <pre wrap="">On 9/27/13 2:12 PM, Bob Arning wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">Following up Herbert's question, I wrote:

compareTiming: a to: b
"
---interpreter vm (5.7.4.1) ---------
Float compareTiming: 1 to: 1.0 ==&gt; 719
Float compareTiming: 1.0 to: 1.0 ==&gt; 991
Float compareTiming: 1 to: 1 ==&gt; 312
Float compareTiming: 1.0 to: 1 ==&gt; 686
---cog vm (2749)---------
*Float compareTiming: 1 to: 1.0  ==&gt; 28162*
Float compareTiming: 1.0 to: 1.0  ==&gt; 148
Float compareTiming: 1 to: 1  ==&gt; 97
Float compareTiming: 1.0 to: 1  ==&gt; 179
"

^[1000000 timesRepeat: [
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
   a &lt; b.
]] timeToRun

So, some obvious questions:
- in the interpreter vm, why is comparing two floats slower that an 
integer and a float?
- what's up with Cog? Three tests are faster by the expected ratio and 
one took a real dive.

Also, the profiler Herbert used could use some attention to the 
NewFloat printing:

99.9 (898,069)  Multiline1  doOneStep:
*77.30000000000001* (694,902)  Multiline1 [HkTestLine] doTests:
     73.8 (663,438)  HkRunin [HkTestStation]  canStartNextTest:

Cheers,
Bob

</pre>
        </blockquote>
        <pre wrap="">
</pre>
      </blockquote>
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <pre wrap="">
</pre>
      </blockquote>
      <pre wrap="">


</pre>
    </blockquote>
    <br>
  </body>
</html>