
Hello all, I noticed that GHC generates slower code on an Linux amd64 bit platform than the 32-bit version on a cheaper 32-bit machine. CPUTime for running sieve of Erathostenes to generate 10,000 primes: Athlon XP 2800 (32-bit): 7.98 secs Athlon 64 3800 (64-bit): 10.29 secs This is using GHC 6.6 on the 64-bit machine and 6.4.1 on the 32-bit one. I googled around and could not find any information regarding degraded performance of ghc/haskell on 64-bit machines. Any ideas? Regards, Pedro

On Fri, 2007-01-05 at 17:51 +0000, Pedro Baltazar Vasconcelos wrote:
Hello all,
I noticed that GHC generates slower code on an Linux amd64 bit platform than the 32-bit version on a cheaper 32-bit machine. CPUTime for running sieve of Erathostenes to generate 10,000 primes: Athlon XP 2800 (32-bit): 7.98 secs Athlon 64 3800 (64-bit): 10.29 secs This is using GHC 6.6 on the 64-bit machine and 6.4.1 on the 32-bit one.
I googled around and could not find any information regarding degraded performance of ghc/haskell on 64-bit machines. Any ideas?
I would suggest re-running that with GHC 6.6. x86-64 support was only really added in GHC 6.4.1 (in 6.4 it only worked for really simple programs). However some general info: memory usage is mostly doubled as every pointer and integer goes from 4 to 8 bytes. Duncan

On Sat, Jan 06, 2007 at 10:31:08AM +0000, Duncan Coutts wrote:
On Fri, 2007-01-05 at 17:51 +0000, Pedro Baltazar Vasconcelos wrote:
Athlon XP 2800 (32-bit): 7.98 secs Athlon 64 3800 (64-bit): 10.29 secs This is using GHC 6.6 on the 64-bit machine and 6.4.1 on the 32-bit one. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I would suggest re-running that with GHC 6.6. x86-64 support was only really added in GHC 6.4.1 (in 6.4 it only worked for really simple programs).
He can only switch to 6.6 on the 32-bit machine, so the difference can only get bigger :-) Best regards Tomasz

I noticed that GHC generates slower code on an Linux amd64 bit platform than the 32-bit version on a cheaper 32-bit machine. CPUTime for running sieve of Erathostenes to generate 10,000 primes: Athlon XP 2800 (32-bit): 7.98 secs Athlon 64 3800 (64-bit): 10.29 secs This is using GHC 6.6 on the 64-bit machine and 6.4.1 on the 32-bit one.
I googled around and could not find any information regarding degraded performance of ghc/haskell on 64-bit machines. Any ideas?
Could it be the effect of doubling the size of pretty much everything, leading to poorer memory-hierarchy performance? Stefan

Hi Pedro, On Fri, Jan 05, 2007 at 05:51:43PM +0000, Pedro Baltazar Vasconcelos wrote:
I noticed that GHC generates slower code on an Linux amd64 bit platform than the 32-bit version on a cheaper 32-bit machine. CPUTime for running sieve of Erathostenes to generate 10,000 primes:
Is it possible to send us the actual code you were using please? Thanks Ian
participants (5)
-
Duncan Coutts
-
Ian Lynagh
-
Pedro Baltazar Vasconcelos
-
Stefan Monnier
-
Tomasz Zielonka