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

Remove redundant member functions of the Action class #1239

Merged
merged 3 commits into from
Feb 12, 2019
Merged

Conversation

marcharper
Copy link
Member

@marcharper marcharper commented Feb 10, 2019

On profiling a tournament I noticed that the removed functions were among the most often called. It turns out that they are unnecessary because Enums provide their own __hash__ and __eq__. This PR speeds up actual tournaments by 20-25% in my (limited) testing.

@meatballs
Copy link
Member

Nicely spotted!

@drvinceknight
Copy link
Member

Nice! I swear I still don't really understand what an Enum is but hey it sure does the job! :)

@drvinceknight drvinceknight merged commit b3efe69 into master Feb 12, 2019
@marcharper marcharper deleted the actions branch February 21, 2019 09:54
@marcharper marcharper mentioned this pull request Mar 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants