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

Allocation Tests #50

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Allocation Tests #50

wants to merge 4 commits into from

Conversation

zsunberg
Copy link
Member

@zsunberg zsunberg commented Jul 11, 2024

This PR adds some allocation tests. Unfortunately they were failig.

@zsunberg
Copy link
Member Author

@himanshugupta1009 didn't we get allocations down to zero with #42? I can't seem to reproduce the no-allocations

@ctessum
Copy link
Contributor

ctessum commented Jul 11, 2024

I think the issue is that MArrays are sometimes allocated to the heap and sometimes allocated to the stack: https://stackoverflow.com/questions/74793823/mutable-data-types-that-use-stack-allocation

So the allocation tests seem to pass in some cases and fail in others, at least when I was trying it.

Unless there's some way to do the calculation with static arrays, the only thing I can think of is to add an interpolate!() method that that takes an object holding those MArrays as an argument, and another function that initializes those arrays. So then you could do the allocation ones and reuse the arrays a lot of times. Is that something there would be interest in?

@zsunberg
Copy link
Member Author

Discussion continued in #51

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