[Haskell-cafe] my knucleotide fast on 64 bit but extremely slow on 32 bit?

Branimir Maksimovic bmaxa at hotmail.com
Thu Mar 28 21:13:45 CET 2013


I have posted previous knucleotide program, it is fast on 64 bit butvery slow on 32 bit.I cannot install 32 bit ghc to test it so I can only guess is thatcause is use of Int64 for hash and HashMap array indexing.What bothers me is that it that much slower , and I guessthat array indexing of 64 bit int where native index is 32 bitis culprit.Am I right? If I make Int index of array it will be fast on32 bit platform too?I cannot imagine that hashing to 64 bit int is culprit ratherarray indexing as I guess that every array accessrequires indirect access on 32 bit platform?
64 bit :http://benchmarksgame.alioth.debian.org/u64q/program.php?test=knucleotide&lang=ghc&id=119.80 secs32 bit:http://benchmarksgame.alioth.debian.org/u32q/program.php?test=knucleotide&lang=ghc&id=191.01 secs ;(
I really like Haskell, but Im frustrated as how inpredictable it is.Im programming from 1983' but found Haskell as much more difficultto program efficiently than C++.In C++ whatever lousy program I write it performs decently,but not so in Haskell. It requires much deeper knowledge thanc++.


 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130328/669a8590/attachment.htm>


More information about the Haskell-Cafe mailing list