Increase Update Efficiency #12

Open
opened 2018-07-08 17:21:24 +00:00 by marty-oehme · 1 comment
marty-oehme commented 2018-07-08 17:21:24 +00:00 (Migrated from gitlab.com)

Instead of iterating over the whole board twice (once for looking at all neighbors, once to set cells to their next state) perhaps build a new grid while doing the first iteration which then just replaces the old grid.

It would need more memory, since a second grid would be contained for the duration; it may need less cpu since it removes one whole Array iteration.

Profile before changing!

Instead of iterating over the whole board *twice* (once for looking at all neighbors, once to set cells to their next state) perhaps build a new grid while doing the first iteration which then just replaces the old grid. It would need more memory, since a second grid would be contained for the duration; it may need less cpu since it removes one whole Array iteration. Profile before changing!
marty-oehme commented 2018-10-25 15:37:31 +00:00 (Migrated from gitlab.com)

changed milestone to %3

changed milestone to %3
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: experiments/cellular-automata#12
No description provided.