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

IterTools.pop should use Base.front instead of implementing it inline in a hackish way #98

Closed
nsajko opened this issue Jan 27, 2023 · 0 comments · Fixed by #117
Closed

Comments

@nsajko
Copy link
Contributor

nsajko commented Jan 27, 2023

This line reimplements Base.front in a presumably suboptimal way:

pop(t::NTuple) = reverse(tail(reverse(t))), t[end]

I guess this would matter for the performance of bigger tuples, that is, bigger values of k in subsets(collection, Val{k}()).

The fix is simple, just use Base.front. However, this package seems to still support Julia 1.0, and even Julia 0.7, and Base.front may have been introduced after that, because I can only find it on https://docs.julialang.org starting with Julia 1.2.

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 a pull request may close this issue.

1 participant