Skip to content

Fast path in NDArray.slice for slices aligned with chunks #380

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

Merged
merged 5 commits into from
Apr 8, 2025

Conversation

FrancescAlted
Copy link
Member

The title says it all

@FrancescAlted FrancescAlted changed the title Fast path for NDArray.slice of consecutive chunks Fast path in NDArray.slice for slices aligned with chunks Apr 8, 2025
@FrancescAlted FrancescAlted requested a review from lshaw8317 April 8, 2025 09:07
Copy link
Collaborator

@lshaw8317 lshaw8317 left a comment

Choose a reason for hiding this comment

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

Two small comments

chunk_size = chunks[i]

# Ensure alignment with chunk boundaries
if start % chunk_size != 0:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do you check this again in the loop?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, not really necessary. Removed.

@lshaw8317
Copy link
Collaborator

Looks good to me

@FrancescAlted FrancescAlted merged commit cd897c9 into main Apr 8, 2025
10 checks passed
@FrancescAlted FrancescAlted deleted the consecutive-slices branch April 8, 2025 10:16
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