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

Make conway updating considerably faster #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Make conway updating considerably faster #6

wants to merge 3 commits into from

Commits on Feb 2, 2018

  1. Make conway updating considerably faster

    It is redundant to independently check if b is 3 and state is 1, and if so set c to 1, and check if b is 3 and state is 0, and if so set c to 1.
    Fold these into one check.
    Additionally, to reduce number of array lookups, fold the remaining two operations into one.
    Thirdly, in newer numpy versions numpy.where() is redundant, and slower than using the array[array condition] syntax
    AlexGreason authored Feb 2, 2018
    Configuration menu
    Copy the full SHA
    4e6d9f1 View commit details
    Browse the repository at this point in the history
  2. Make convolution considerably faster

    scipy has a method for convolution now
    AlexGreason authored Feb 2, 2018
    Configuration menu
    Copy the full SHA
    9b65e52 View commit details
    Browse the repository at this point in the history
  3. Revert convolution change

    The other one is faster, but it requires using a merely (3,3) kernel rather than one the size of the full state, so it isn't no-changes compatible, and it requires scipy so the travis build fails
    AlexGreason authored Feb 2, 2018
    Configuration menu
    Copy the full SHA
    1cff666 View commit details
    Browse the repository at this point in the history