Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimization: Neighbor Pre-fetch #10

merged 2 commits into from Jun 8, 2019


1 participant
Copy link

commented Jun 8, 2019

Fixes #9

Uses toroidal matrix for neighbor generation. This results in an extremely significant speed increase in pre-fetching neighbors. On larger grids, neighbor generation could take nearly a minute, but with this change the same size grid it takes miliseconds. The code to actually grab the neighbors isn't the prettiest, but it works great!

This PR also adds the ability to create even smaller squares (for larger fields) which is now possible with decent performance thanks to #8 and this PR. Kind of a hidden feature for now.

@amiantos amiantos merged commit d83701a into master Jun 8, 2019

@amiantos amiantos deleted the neighbor-optimization branch Jun 8, 2019

@amiantos amiantos added this to Done in Screensaver v1.1 Jun 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.