I&#39;ve attached a benchmark run for x86-FreeBSD on my machine. An interesting<br>thing from the benchmark-run of the recent trunk:<br><br>testing real<br>666c666<br>&lt; 11.59195423<br>---<br>&gt; 11.59195518<br>817c817<br>
&lt; 11.59195423<br>---<br>&gt; 11.59195518<br><br>I note that <br><br><a href="http://mlton.org/pages/PortStatus/attachments/x86-freebsd.log">http://mlton.org/pages/PortStatus/attachments/x86-freebsd.log</a><br><br>has the regression as well.
<br><br><div><span class="gmail_quote">On 6/21/07, <b class="gmail_sendername">Matthew Fluet</b> &lt;<a href="mailto:fluet@tti-c.org">fluet@tti-c.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Jesper Louis Andersen wrote:<br>&gt; Yup, that was indeed the problem. With -codegen x86 it runs. I can add the<br>&gt; benchmark results besides yours in the same format in SVN if you like it,<br>&gt; or I can post them here.
<br><br>I &quot;reset&quot; the <a href="http://www.mlton.org/PortStatus">http://www.mlton.org/PortStatus</a> wiki page.<br>I think it makes sense to accumulate logs and benchmarks there.<br><br>&gt; It will probably take some time to run anyway.
<br><br>Definitely.&nbsp;&nbsp;It&#39;s multiple hours with 8 different compilers.<br><br><br>&gt; On 6/21/07, Matthew Fluet &lt;<a href="mailto:fluet@tti-c.org">fluet@tti-c.org</a>&gt; wrote:<br>&gt;&gt;<br>&gt;&gt; Jesper Louis Andersen wrote:
<br>&gt;&gt; &gt; Hmm, it failed the -codegen native as well as -codegen amd64. I&#39;ll<br>&gt;&gt; &gt; investigate further.<br>&gt;&gt;<br>&gt;&gt; For mlton-20051205 (on x86 or x86_64), -codegen native implies using the
<br>&gt;&gt; x86 codegen.<br>&gt;&gt;<br>&gt;&gt; For mlton.svn.trunk, -codegen native has been eliminated.<br>&gt;&gt; On x86, -codegen x86 implies using the x86 codegen.<br>&gt;&gt; On amd64, -codegen amd64 implies using the amd64 codegen.
<br>&gt;&gt;<br>&gt;&gt; It would be easy to restore the -codegen native option on<br>&gt;&gt; mlton.svn.trunk and choose the appropriate native codegen for the<br>&gt;&gt; architecture.<br>&gt;&gt;<br>&gt;&gt; &gt; On 6/21/07, Jesper Louis Andersen &lt;
<a href="mailto:jesper.louis.andersen@gmail.com">jesper.louis.andersen@gmail.com</a>&gt;<br>&gt;&gt; wrote:<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; I have a 32bit FreeBSD compile ready. Benchmarks to trickle in<br>&gt;&gt; tomorrow
<br>&gt;&gt; &gt;&gt; when I<br>&gt;&gt; &gt;&gt; get it to crunch while at work (It takes a fair amount of time for it<br>&gt;&gt; to<br>&gt;&gt; &gt;&gt; finish and I don&#39;t<br>&gt;&gt; &gt;&gt; want to mess too much with the laptop while it processes the
<br>&gt;&gt; benchmarks).<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; There are also a few tweaks needed to run on 64-bit FreeBSD. I hope to<br>&gt;&gt; be<br>&gt;&gt; &gt;&gt; able to<br>&gt;&gt; &gt;&gt; look into them around the 1st of July.
<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; On 6/20/07, Matthew Fluet &lt;<a href="mailto:fluet@tti-c.org">fluet@tti-c.org</a>&gt; wrote:<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; I&#39;ve merged the x86_64 branch into trunk.&nbsp;&nbsp;Since the previous
<br>&gt;&gt; &gt;&gt; &gt; announcement of the experimental release, there were only two minor<br>&gt;&gt; &gt;&gt; bugs<br>&gt;&gt; &gt;&gt; &gt; reported:<br>&gt;&gt; &gt;&gt; &gt;&nbsp;&nbsp; 1) Bug with -align 8 on x86_64<br>&gt;&gt; &gt;&gt; &gt;&nbsp;&nbsp; 2) Inconsistent behavior with -const &#39;
MLton.detectOverflow false&#39;<br>&gt;&gt; &gt;&gt; &gt; These have both been fixed, and I&#39;m pretty happy with the state of<br>&gt;&gt; the<br>&gt;&gt; &gt;&gt; &gt; x86_64 port.<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; I ran the benchmark suite to compare the last public release to the
<br>&gt;&gt; &gt;&gt; &gt; current trunk.&nbsp;&nbsp;It is a bit of an apples-to-oranges comparison,<br>&gt;&gt; since<br>&gt;&gt; I<br>&gt;&gt; &gt;&gt; &gt; ran the benchmarks on an AMD Opteron (64-bit) system.&nbsp;&nbsp;So, the<br>&gt;&gt; 20051205
<br>&gt;&gt; &gt;&gt; &gt; compiler (and its resulting executables) are running in 32-bit mode,<br>&gt;&gt; &gt;&gt; &gt; while the trunk compiler (and its resulting executables) are running<br>&gt;&gt; in<br>&gt;&gt; &gt;&gt; &gt; 64-bit mode.
<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; [BTW, it would be nice if someone could run a corresponding<br>&gt;&gt; benchmark<br>&gt;&gt; &gt;&gt; &gt; suite on a 32-bit system, for a more apples-to-apples comparison.]
<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; You can see all of the results at:<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; <a href="http://mlton.org/cgi-bin/viewsvn.cgi/*checkout*/mlton/trunk/doc/x86_64-port-notes/bench-20070619.txt?rev=5659">
http://mlton.org/cgi-bin/viewsvn.cgi/*checkout*/mlton/trunk/doc/x86_64-port-notes/bench-20070619.txt?rev=5659</a><br>&gt;&gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; Some of the highlights:
<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; * Benchmarks were run on a uni-core, dual-processor AMD Opteron<br>&gt;&gt; &gt;&gt; 2.0GHz ,<br>&gt;&gt; &gt;&gt; &gt; 8GB Memory, Fedora Core 6 machine (with gcc version 
4.1.1 and linux<br>&gt;&gt; &gt;&gt; &gt; version 2.6.20 (x86_64)).<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; * compile time and code size is up across the board on trunk vs<br>&gt;&gt; &gt;&gt; &gt; 20051205.&nbsp;&nbsp;I suspect that part of the code size increase can be
<br>&gt;&gt; &gt;&gt; &gt; attributed to the comparison of 32-bit executables to 64-bit<br>&gt;&gt; &gt;&gt; &gt; executables.&nbsp;&nbsp;Any 64-bit operation requires an additional 8bit<br>&gt;&gt; &gt;&gt; &gt; instruction prefix (as do 32-bit ops that touch the extended
<br>&gt;&gt; register<br>&gt;&gt; &gt;&gt; &gt; set).&nbsp;&nbsp;Compile time is probably partly explained by the bigger Basis<br>&gt;&gt; &gt;&gt; &gt; Library implementation (increasing elaboration time and carrying<br>&gt;&gt; more
<br>&gt;&gt; &gt;&gt; &gt; code through early optimizations), and partly by the fact that the<br>&gt;&gt; &gt;&gt; trunk<br>&gt;&gt; &gt;&gt; &gt; compiler is executing a little slower than the 20051205 compiler.<br>&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt; &gt;&gt; &gt; * recent versions of gcc are doing fairly well with the C<br>&gt;&gt; code.&nbsp;&nbsp;(Note<br>&gt;&gt; &gt;&gt; &gt; that using -codegen c with 20051205 uses the version of gcc on the<br>&gt;&gt; host<br>
&gt;&gt; &gt;&gt; &gt; machine.)&nbsp;&nbsp;Indeed, the flat-array.sml benchmark needs to be revised,<br>&gt;&gt; as<br>&gt;&gt; &gt;&gt; &gt; gcc recognizes that the inner loop is pure (Overflow exceptions are<br>&gt;&gt; &gt;&gt; &gt; handled within the loop) and unused.&nbsp;&nbsp;The SSA{,2} optimizer should
<br>&gt;&gt; also<br>&gt;&gt; &gt;&gt; &gt; discover that the loop may be optimized, but that is another issue.<br>&gt;&gt; &gt;&gt; &gt; GCC also does fairly well on the checksum benchmark with 20051205,<br>&gt;&gt; &gt;&gt; &gt; though it does horribly on the checksum benchmark with trunk.
<br>&gt;&gt; &gt;&gt; &gt; I suspect that the later behavior is due to the fact that on x86_64,<br>&gt;&gt; &gt;&gt; &gt; sequences (arrays/vectors) are indexed by 64-bit integers in the<br>&gt;&gt; &gt;&gt; &gt; primitive operations (sub, update, etc), but indexed by 32-bit
<br>&gt;&gt; integers<br>&gt;&gt; &gt;&gt; &gt; in the user code (Array.sub, Array.update, etc. since <a href="http://Int.int">Int.int</a><br>&gt;&gt; &gt;&gt; &gt; corresponds to <a href="http://Int32.int">Int32.int</a> ).&nbsp;&nbsp;Hence, there are quite a few 64/32
<br>&gt;&gt; &gt;&gt; &gt; conversions going on.<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; * I note that with both native codegens and C codegens, with both<br>&gt;&gt; &gt;&gt; &gt; 20051205 and trunk, that -align 8 often has a positive impact on
<br>&gt;&gt; &gt;&gt; &gt; runtime, and rarely has a significant negative impact.&nbsp;&nbsp;This<br>&gt;&gt; might be<br>&gt;&gt; &gt;&gt; &gt; due to the Opteron memory system.&nbsp;&nbsp;Aligned reads probably help most<br>&gt;&gt; on<br>
&gt;&gt; &gt;&gt; &gt; Real64 intensive benchmarks.<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; * The amd64 codegen is doing alright as compared to the x86<br>&gt;&gt; codegen.&nbsp;&nbsp;I<br>&gt;&gt; &gt;&gt; &gt; see at most a factor of 2 slowdown, and a few speedups.&nbsp;&nbsp;Again, I&#39;m
<br>&gt;&gt; not<br>&gt;&gt; &gt;&gt; &gt; sure what real conclusions can be drawn.&nbsp;&nbsp;Some slowdowns are going<br>&gt;&gt; &gt;&gt; to be<br>&gt;&gt; &gt;&gt; &gt; due to the changes to the runtime and Basis Library since 20051205;
<br>&gt;&gt; to<br>&gt;&gt; &gt;&gt; &gt; isolate those, I need a comparison of 20051205 to trunk on a 32-bit<br>&gt;&gt; &gt;&gt; &gt; system.&nbsp;&nbsp;Some slowdowns are probably going to be due to the sequence<br>&gt;&gt; &gt;&gt; &gt; indexing discussed above.
<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; _______________________________________________<br>&gt;&gt; &gt;&gt; &gt; MLton mailing list<br>&gt;&gt; &gt;&gt; &gt; 
<a href="mailto:MLton@mlton.org">MLton@mlton.org</a><br>&gt;&gt; &gt;&gt; &gt; <a href="http://mlton.org/mailman/listinfo/mlton">http://mlton.org/mailman/listinfo/mlton</a><br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt;
<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; ------------------------------------------------------------------------<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; _______________________________________________
<br>&gt;&gt; &gt; MLton mailing list<br>&gt;&gt; &gt; <a href="mailto:MLton@mlton.org">MLton@mlton.org</a><br>&gt;&gt; &gt; <a href="http://mlton.org/mailman/listinfo/mlton">http://mlton.org/mailman/listinfo/mlton</a><br>
&gt;&gt;<br>&gt;&gt;<br>&gt;<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; _______________________________________________<br>&gt; MLton mailing list<br>&gt; <a href="mailto:MLton@mlton.org">
MLton@mlton.org</a><br>&gt; <a href="http://mlton.org/mailman/listinfo/mlton">http://mlton.org/mailman/listinfo/mlton</a><br><br></blockquote></div><br>