
24 Nov
2008
24 Nov
'08
5:14 a.m.
Malcolm Reynolds wrote:
I'm attempting to learn Haskell by going through the project euler problems. Number 10, http://projecteuler.net/index.php?section=problems&id=10 , involves summing prime numbers. It's easy in terms of coding something up that works, but I'm having a lot of trouble getting decent performance.
See also http://haskell.org/haskellwiki/Prime_numbers Note that your C version uses a different algorithm than your Haskell version, the former uses an array with random access while the latter uses a linked list. Regards, apfelmus