On Dec 11, 2007 4:18 PM, comex <[EMAIL PROTECTED]> wrote:
> So, I'm a brainfuck newbie.  I've made a program to store the primes in
> memory (not print them) that is 267 valid characters long.  But I wouldn't
> be surprised if someone else has made a much shorter implementation; and I
> bet formatting the numbers will add quite a bit to the character count.
> Thoughts?  Can I hear some other peoples' character counts?

I haven't previously made a serious attempt to do anything with
brainfuck either.  I've given this a shot myself, and so far I've come
up with a 602-character stored-list program, a reorganization of the
same program that saved a disappointing 31 characters, and a
full-generation program that's at 448 characters.  Sounds like
Zefram's got me pretty well beat, although both of those have plenty
of room left for optimization.

The first program is roughly 33% storage, 40% output, and the rest
iteration/extraction.  The second one is roughly 55% generation, 45%
output.

-root

Reply via email to