Branimir Maksimovic | 28 Mar 21:13 2013
Picon

my knucleotide fast on 64 bit but extremely slow on 32 bit?

I have posted previous knucleotide program, it is fast on 64 bit but
very slow on 32 bit.
I cannot install 32 bit ghc to test it so I can only guess is that
cause is use of Int64 for hash and HashMap array indexing.
What bothers me is that it that much slower , and I guess
that array indexing of 64 bit int where native index is 32 bit
is culprit.
Am I right? If I make Int index of array it will be fast on
32 bit platform too?
I cannot imagine that hashing to 64 bit int is culprit rather
array indexing as I guess that every array access
requires indirect access on 32 bit platform?

64 bit :
19.80 secs
32 bit:
91.01 secs ;(

I really like Haskell, but Im frustrated as how inpredictable it is.
Im programming from 1983' but found Haskell as much more difficult
to program efficiently than C++.
In C++ whatever lousy program I write it performs decently,
but not so in Haskell. It requires much deeper knowledge than
c++.



_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Don Stewart | 28 Mar 21:23 2013
Picon

Re: my knucleotide fast on 64 bit but extremely slow on 32 bit?

Int64 is emulated on 32 bit. So it is not as efficient by a long shot.

On Thursday, 28 March 2013, Branimir Maksimovic wrote:

I have posted previous knucleotide program, it is fast on 64 bit but
very slow on 32 bit.
I cannot install 32 bit ghc to test it so I can only guess is that
cause is use of Int64 for hash and HashMap array indexing.
What bothers me is that it that much slower , and I guess
that array indexing of 64 bit int where native index is 32 bit
is culprit.
Am I right? If I make Int index of array it will be fast on
32 bit platform too?
I cannot imagine that hashing to 64 bit int is culprit rather
array indexing as I guess that every array access
requires indirect access on 32 bit platform?

64 bit :
19.80 secs
32 bit:
91.01 secs ;(

I really like Haskell, but Im frustrated as how inpredictable it is.
Im programming from 1983' but found Haskell as much more difficult
to program efficiently than C++.
In C++ whatever lousy program I write it performs decently,
but not so in Haskell. It requires much deeper knowledge than
c++.



_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Branimir Maksimovic | 29 Mar 21:00 2013
Picon

Re: my knucleotide fast on 64 bit but extremely slow on 32 bit?

Corrected, little bit slower on 64 bit but much faster on 32 bit version.
(also made hashmap grow from small default size as it is becnh req)
28 secs for 32 bit.
25 secs for  64 bit

Date: Thu, 28 Mar 2013 20:23:39 +0000
Subject: Re: [Haskell-cafe] my knucleotide fast on 64 bit but extremely slow on 32 bit?
From: dons00 <at> gmail.com
To: bmaxa <at> hotmail.com
CC: haskell-cafe <at> haskell.org

Int64 is emulated on 32 bit. So it is not as efficient by a long shot.


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Gmane