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

Push parameter caching up to Collection? #1143

Open
mattwthompson opened this issue Jan 15, 2025 · 0 comments
Open

Push parameter caching up to Collection? #1143

mattwthompson opened this issue Jan 15, 2025 · 0 comments

Comments

@mattwthompson
Copy link
Member

          Might it also make sense to generalize this caching code to the `Collection` class - perhaps have a `parameters: dict[TopologyKey | <etc>, Potential` property there? I imagine most of the cost of `_get_charges()` is the repeated dictionary lookups, though maybe having to do an attribute lookup would just reproduce that. `parameters: dict[TopologyKey | <etc>, tuple[int, ...]` would be a nicer, maybe faster API, but it would mean each collection would have to somehow define an ordered set of parameters. I'm not sure if that would be worthwhile.

Originally posted by @Yoshanuikabundi in #1115 (review)

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

No branches or pull requests

1 participant