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

Remove flatten comment #1801

Merged
merged 1 commit into from
Jun 6, 2022
Merged

Remove flatten comment #1801

merged 1 commit into from
Jun 6, 2022

Conversation

kennykerr
Copy link
Collaborator

Based on #1795 and analysis by @AronParker and @rylev, flatten cannot be turned into a pure iterator as Rust doesn't appear to support recursive iterators. rust-lang/rust#97686

Here I'm just removing the comment as there's no more work to be done here.

Copy link
Contributor

@AronParker AronParker left a comment

Choose a reason for hiding this comment

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

Seems reasonable. At best performance is improved from 62 to 6 microseconds, which is probably lost in noise as to my understanding the flatten call is only done once and not in a tight loop. Also by merging the recursive or iterative approaches I outlined here a lot of readability/simpliticty/maintainability gets lost. So I'm all for it.

@rylev rylev merged commit f4e3218 into master Jun 6, 2022
@rylev rylev deleted the flatten branch June 6, 2022 21:13
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.

None yet

3 participants