On Tue, Nov 8, 2011 at 10:47 PM, Graham Cox <graham....@bigpond.com> wrote:
> Getting back to the original problem, you don't state how big a grid you 
> want. But it seems to me that a bitmap like this can be stored very 
> efficiently because it has a lot of zeroed out space. Run-length encoding for 
> example should compress it very substantially. You might need to roll your 
> own bitmap structure to access it and store it since the overhead of arrays 
> and so on might be what's killing you.

It's user-configurable.  If the user asks for too big a grid, I want
to be able to tell them that there isn't enough memory, then suggest
they try a smaller grid.

In fact I do plan to use more-efficient and therefore more-complex
data structures that will use less memory, and run faster as well.
But that doesn't fix the problem of my process being killed without
warning when it uses too much memory.  While a better algorithm would
allow the effect of a much larger grid, Conway's Life patterns can
grow without bound.  I need to know ahead of time when further growth
is not tolerable.


-- 
Don Quixote de la Mancha
Dulcinea Technologies Corporation
Software of Elegance and Beauty
http://www.dulcineatech.com
quix...@dulcineatech.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to