Increase Update Efficiency #12
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: experiments/cellular-automata#12
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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!
changed milestone to %3