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

PERF: Optimize GAMER IO #4651

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

matthewturk
Copy link
Member

This PR includes some changes to optimize GAMER IO. I will be updating it in individual increments with new attempts at optimization, as while my tests here suggest it is indeed still producing correct results, I would like to see both the speed changes and the answers from Fido.

yt/frontends/gamer/io.py Outdated Show resolved Hide resolved
@jzuhone
Copy link
Contributor

jzuhone commented Aug 25, 2023

LGTM

jzuhone
jzuhone previously approved these changes Aug 25, 2023
@neutrinoceros neutrinoceros changed the title OPT: Optimize GAMER IO PERF: Optimize GAMER IO Aug 25, 2023
@matthewturk
Copy link
Member Author

Looking at the early results from Fido I'm wondering if perhaps the caching is breaking things.

@@ -91,13 +92,39 @@ def _read_particle_fields(self, chunks, ptf, selector):
data = self._group_particle[field][start:end]
yield (ptype, field), data[mask]

@lru_cache(maxsize=8) # noqa
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the noqa comment ? (making it specific to the warning(s) you want to filter, e.g. noqa: E555, would answer my question)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants