<p dir="ltr">GHC is not the spec, I am talking about GHC Haskell, not Haskell the standard that I don&#39;t use. </p>
<p dir="ltr">On 32bit machines, GHC Int is 32bits. On 64bit GHC on 64bit machines Int is 64 bits. </p>
<p dir="ltr">If you have another well engineered suitable for wide use Haskell compiler in mind, I&#39;d love to try it out, but with interesting software you will be using none portable features per target platform. And thats OK. Its a tradeoff thats sometimes worth making.  </p>

<div class="gmail_quote">On Jun 3, 2013 4:19 AM, &quot;Tommy Thorn&quot; &lt;<a href="mailto:tt1729@yahoo.com">tt1729@yahoo.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Jun 3, 2013, at 00:23 , Carter Schonwald &lt;<a href="mailto:carter.schonwald@gmail.com">carter.schonwald@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Int is &quot;native register sized integer&quot;<br>
<br>
Actually it&#39;s not. Read the definition. Int is only guaranteed to be 29 bits.<br>
<br>
Here&#39;s *one* _actual_ data point (from a 2.8 GHz i7, 64-bit code):<br>
<br>
time ./fib<br>
fib(43) = 701408733<br>
        3.27 real         3.27 user         0.00 sys<br>
time ./fib-safe<br>
fib(43) = 701408733<br>
        3.45 real         3.45 user         0.00 sys<br>
<br>
(NB: I do not check the n-1 and n-2 as it&#39;s trivial to see from a data flow analysis<br>
that the proceeding conditional guarantees that those can&#39;t overflow.<br>
The empty asm() is necessary to get GCC to generate comparable code).<br>
<br>
<br><br>
<br>
Obviously, for some examples this will be much worse, for others, much better, but without<br>
this implemented in GHC it will be difficult to measure.<br>
<br>
Tommy<br>
<br>
<br></blockquote></div>