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

(refactor): remove ArraySubset unchecked methods #156

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

Conversation

ilan-gold
Copy link

Towards #52, making the API surface of ArraySubset will help determine what common operations can be moved to a trait

The two commit messages (so far) should signal what is being removed (so far), although they might have a non-trivial dragnet i.e., removing one function entailed removing others.

I haven't benchmarked this yet, but the size of the code-diff smells positive. Hopefully there's no performance knoc

While going through this PR, though, I learned about https://doc.rust-lang.org/reference/items/generics.html - we could maybe remove the dimensionality checks altogether if we parametrize the dimension? I'm not sure about this one though, would be curious to learn more

@LDeakin
Copy link
Owner

LDeakin commented Mar 5, 2025

Yeah, all of these unchecked variants probably make negligible difference to perf. I'll do a benchmark when your PR is ready to go.

While going through this PR, though, I learned about https://doc.rust-lang.org/reference/items/generics.html - we could maybe remove the dimensionality checks altogether if we parametrize the dimension? I'm not sure about this one though, would be curious to learn more

Definitely don't want to parameterize on the dimensionality, as that would cause massive code bloat to monomorphisation.

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