On Tue, 19 Dec 2000, Simon Peyton-Jones wrote:
| Another way to do this is to compute the final array directly,
| instead of computing successive versions of the array:
|
| import Array
| primes n = [ i | i - [2 ..n], not (primesMap ! i)] where
| primesMap = accumArray (||)
There are numerous ways of optimising sieving for primes, none of which have much
to do with this list. For example, two suggestions:
(1) for each k modulo 2*3*5*7, if k is divisible by 2/3/5 or 7, ignore, otherwise
sieve separately for this k on higher primes. (Or you might use products of
There are numerous ways of optimising sieving for primes, none of which
have much to do with this list. For example, two suggestions:
(1) for each k modulo 2*3*5*7, if k is divisible by 2/3/5 or 7, ignore, otherwise
sieve separately for this k on higher primes. (Or you might use
The Haskell website claims that
"Ericsson measured an improvement factor of between 9 and 25 in one set of experiments
on telephony software".
Presumably this is with Erlang not with Haskell. I have searched for the reference
that substantiates this claim but I've only been able to find:
I think you can simplify the example. Given
class HasFoo a b | a - b where
foo :: a - b
instance HasFoo Int Bool where ...
Is this legal?
f :: HasFoo Int b = Int - b
f x = foo x
You might think so, since
HasFoo Int b = Int - b
is a
Can someone point me at some more references?
See http://haskell.org/papers/NSWC/jfp.ps.
-Paul
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
There is a thread on comp.lang.functional which may be of interest.
Here is a link that might work for you.
http://www.deja.com/dnquery.xp?search=threadsvcclass=dnserverrecnum=%3c8lh
8ss$6le$[EMAIL PROTECTED]%3e%231/1
-Original Message-
From: Steinitz, Dominic J
[mailto:[EMAIL
Hello all,
You will need to manually reconnect the link I sent into a single line
for it to work.
There is a thread on comp.lang.functional which may be of interest.
Here is a link that might work for you.
http://www.deja.com/dnquery.xp?search=threadsvcclass=dnserverrecnum=%3c8lh
Are there any plans to port GHC to Darwin? Darwin is a FreeBSD-variant
that runs on the PowerPC processor.
http://www.opensource.apple.com/projects/darwin/.
I was going to compile it myself before I remembered that compilers do
platform-specific code-generation. Duh.
--
Ashley Yakeley,
ANNOUNCING Happy 1.9 - The LALR(1) Parser Generator for Haskell
-
I'm pleased to announce version 1.9 of Happy, the parser generator
system for Haskell. Changes in this version, relative to version 1.8
(the previous full
Hello,
I wrote recently on generating prime numbers
[..]
The DoCon program written in Haskell (again, no arrays) gives
[..]
take 5 $ filter isPrime [(10^9 ::Integer) ..]
--
[17,19,100021,100033,100087]
This takes 0.05 sec.
[..]
But it is better to
On Thu, 21 Dec 2000, S.D.Mechveliani wrote:
Hello,
On generating prime numbers, people wrote
...
| import Array
| primes n = [ i | i - [2 ..n], not (primesMap ! i)] where
| primesMap = accumArray (||) False (2,n) multList
| [..]
I think that it is good for
12 matches
Mail list logo