Optimize Conway with a Summed Area Table#436
Merged
chrisib merged 4 commits intoAllen-Synthesis:mainfrom Jun 6, 2025
Merged
Conversation
Collaborator
Author
|
Debugging a very strange problem that seems to occur after a few hours of continuous use: The stack trace calls are It's consistently that line that breaks, but I haven't succeeded in any debugging inspections yet. Launching from the intepreter: >>> from contrib.conway import Conway
>>> c = Conway()
>>> c.main()
...
AttributeError: 'bool' object has no attribute 'field_sum're-running the offending function: >>> c.tick()works fine. So it seems to be some sort of runtime memory issue? Maybe there's a pointer that's going squirrely? Something is going wrong, but I haven't figured out exactly what or why yet. |
Collaborator
Author
|
Was using uPython 1.24.1, so let's see if it goes away after upgrading to 1.25.0... |
Collaborator
Author
|
Ran it overnight with 1.25.0 and the issue didn't reoccur. Frustrating that I can't figure out what happened, but it seems to be fixed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Simple performance optimization for Conway to use a Summed Area Table instead of iterating through the neighbourhoods of changed pixels. This should keep the framerate more stable.
Replaces #435, though the multi-threaded approach may be reintroduced later.