Skip to content

improve construction of <:Tuple types from constant-length iterators #53152

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

Closed

Conversation

nsajko
Copy link
Contributor

@nsajko nsajko commented Feb 1, 2024

Make tuple construction from known constant-length iterators inferrable and prevent allocation.

Fixes #52993

@nsajko nsajko added performance Must go faster collections Data structures holding multiple items, e.g. sets labels Feb 1, 2024
@nsajko nsajko force-pushed the tuple_from_constant_length_iterator branch 3 times, most recently from 9ec44a9 to 02551ca Compare February 1, 2024 22:41
Make tuple construction from known constant-length iterators inferrable
and prevent allocation.

Fixes JuliaLang#52993
@nsajko nsajko force-pushed the tuple_from_constant_length_iterator branch from 02551ca to f26e835 Compare February 2, 2024 11:35
Copy link
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

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

This PR just looks like just a lot of extra special cases and edge cases to have to verify and maintain. Can you explain what the basic concept is here?

Copy link
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

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

Perhaps it could take some more inspiration from afoldl or ntuple implementations?

@nsajko
Copy link
Contributor Author

nsajko commented Feb 9, 2024

Closing in favor of #53265, hope that one will get accepted instead.

@nsajko nsajko closed this Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
collections Data structures holding multiple items, e.g. sets performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

constructing tuples from known constant-length collections should be inferrable and shouldn't allocate
2 participants