Re: Vernon's Prime Sieve

From: vernonner3voltazim (vnemitz_at_pinn.net)
Date: 08/02/04


Date: 2 Aug 2004 15:19:27 -0700

Alex Hunsley <lard@tardis.ed.ac.molar.uk> wrote:
> vernonner3voltazim wrote:
>
> > // This overall prime-sieve algorithm was independently
> > created by Vernon Nemitz. Someone else
>
> Your code is an ideal example of why writing code no longer
> than 79 chars pers line is a Good Idea!
>

(Off-Topic)
That's actually pretty easy to do if one never comments the
code. Having spent years programming first on a hardware-
limited 32-column text screen, and later on a hardware-limited
80-column text screen, I relished the graphics-software-based
editors that let me get 100+ characters per line.

As far as UseNet posts are concerned, I've noticed that
about 71 or 72 characters is about as much as you can get
per line before it wraps. I could wish the underlying
code was updated to not do that. Modern browsers are
able to provide wide lines that wrap without needed to
be told by the server.

Anyway, in one of the later posts to this Thread, you will
find the code edited to fit with almost no wrapping.
You will also find evidence of its inefficiency, in
comparison to other sieve algorithms. So it goes.
Still, it was fun, and I don't regret it.

As an aside, I've figured out a way to take all the
primes that fit in 32 bits (203million+) and compress
those 812+million bytes down to about 130 million bytes.
Is that efficient or not?

Thanks in advance!