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

Cache structs to save memory use on repeated calls to _taylorinteg! #203

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

PerezHz
Copy link
Owner

@PerezHz PerezHz commented Dec 9, 2024

This PR introduces some cache structs which allow reusing memory on repeated calls to _taylorinteg!.

@coveralls
Copy link

coveralls commented Dec 9, 2024

Coverage Status

coverage: 95.078% (-0.6%) from 95.697%
when pulling d7d4769 on jp/cache
into de3e06a on main.

@PerezHz PerezHz changed the title Cache structs to avoid allocations on repeated calls to _taylorinteg! Cache structs to save memory use on repeated calls to _taylorinteg! Dec 10, 2024
@PerezHz PerezHz marked this pull request as ready for review December 10, 2024 15:44
@PerezHz
Copy link
Owner Author

PerezHz commented Dec 10, 2024

This is ready for review @lbenet @LuEdRaMo

@lbenet
Copy link
Collaborator

lbenet commented Dec 10, 2024

Thanks @PerezHz for the nice addition. Do you have some comparisons/benchmarks? I'll have a look into it in the next few days!

@PerezHz PerezHz marked this pull request as draft December 20, 2024 04:36
@PerezHz
Copy link
Owner Author

PerezHz commented Dec 20, 2024

@lbenet I'm trying out some changes in this PR which will help re-use more memory while making this cache concept more user-friendly. I'll run benchmarks once this is ready.

@LuEdRaMo
Copy link
Contributor

@PerezHz: If I create a cache object once and then reuse it, do I have to update de cache.t, cache.x and cache.dx variables before every integration? If so, I think it would be nice to have a function for this.

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.

4 participants