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

Performance improvements #82

Merged
merged 12 commits into from
Apr 3, 2019
Merged

Conversation

ngoldbaum
Copy link
Member

This includes fixes for several performance issues I found integrating unyt with yt.

Big changes are refactoring of parsing into a new unyt._parsing private module, which allows me to refactor the UnitSystem class to parse unit names and store unit expressions internally, a big performance win since we can avoid repeatedly and expensively parsing unit strings whenever we go through the unit system machinery.

This also includes a small behavior change in the cgs/mks conversion rules to make them slightly more relaxed. This leads to a big performance wins for all unit conversions so I definitely think it's worth it, see the test changes for the extent of the changes.

Last there are a few other more minor or isolated changes that were all clear-cut performance wins and didn't lead to any test changes.

So long as @jzuhone approves of the test changes I'm going to cut another release based on this PR so I can update the yt tests and hopefully substantially improve the performance over there.

@ngoldbaum
Copy link
Member Author

Tests are passing, this should be ready to review now.

@ngoldbaum ngoldbaum merged commit a402036 into yt-project:master Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants