Int64 is emulated on 32 bit. So it is not as efficient by a long shot.<span></span><br><br>On Thursday, 28 March 2013, Branimir Maksimovic  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div><div dir="ltr">I have posted previous knucleotide program, it is fast on 64 bit but<div>very slow on 32 bit.</div><div>I cannot install 32 bit ghc to test it so I can only guess is that</div><div>cause is use of Int64 for hash and HashMap array indexing.</div>
<div>What bothers me is that it that much slower , and I guess</div><div>that array indexing of 64 bit int where native index is 32 bit</div><div>is culprit.</div><div>Am I right? If I make Int index of array it will be fast on</div>
<div>32 bit platform too?</div><div>I cannot imagine that hashing to 64 bit int is culprit rather</div><div>array indexing as I guess that every array access</div><div>requires indirect access on 32 bit platform?</div><div>
<br></div><div>64 bit :</div><div><a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=knucleotide&amp;lang=ghc&amp;id=1" target="_blank">http://benchmarksgame.alioth.debian.org/u64q/program.php?test=knucleotide&amp;lang=ghc&amp;id=1</a></div>
<div><span style="font-family:verdana,arial,sans-serif;font-size:10pt;text-align:right;background-color:rgb(238,238,238)">19.80 secs</span></div><div><span style="font-family:verdana,arial,sans-serif;font-size:10pt;text-align:right;background-color:rgb(238,238,238)">32 bit:</span></div>
<div><a href="http://benchmarksgame.alioth.debian.org/u32q/program.php?test=knucleotide&amp;lang=ghc&amp;id=1" target="_blank">http://benchmarksgame.alioth.debian.org/u32q/program.php?test=knucleotide&amp;lang=ghc&amp;id=1</a></div>
<div><span style="font-family:verdana,arial,sans-serif;font-size:10pt;text-align:right;background-color:rgb(238,238,238)">91.01 secs ;(</span></div><div><span style="font-family:verdana,arial,sans-serif;font-size:10pt;text-align:right;background-color:rgb(238,238,238)"><br>
</span></div><div><span style="font-family:verdana,arial,sans-serif;font-size:10pt;text-align:right;background-color:rgb(238,238,238)">I really like Haskell, but Im frustrated as how inpredictable it is.</span></div><div>
<span style="font-family:verdana,arial,sans-serif;font-size:10pt;text-align:right;background-color:rgb(238,238,238)">Im programming from 1983&#39; but found Haskell as much more difficult</span></div><div><span style="font-family:verdana,arial,sans-serif;font-size:10pt;text-align:right;background-color:rgb(238,238,238)">to program efficiently than C++.</span></div>
<div><span style="font-family:verdana,arial,sans-serif;font-size:10pt;text-align:right;background-color:rgb(238,238,238)">In C++ whatever lousy program I write it performs decently,</span></div><div><span style="font-family:verdana,arial,sans-serif;font-size:10pt;text-align:right;background-color:rgb(238,238,238)">but not so in Haskell. It requires much deeper knowledge than</span></div>
<div><span style="font-family:verdana,arial,sans-serif;font-size:10pt;text-align:right;background-color:rgb(238,238,238)">c++.</span></div><div><span style="font-family:verdana,arial,sans-serif;font-size:10pt;text-align:right;background-color:rgb(238,238,238)"><br>
</span></div><div><span style="font-family:verdana,arial,sans-serif;font-size:10pt;text-align:right;background-color:rgb(238,238,238)"><br></span></div><div><br></div>                                               </div></div>
</blockquote>