JuliaCollections / IterTools.jl

Common functional iterator patterns
Other
152 stars 28 forks source link

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

Closed nsajko closed 8 months ago

nsajko commented 1 year ago

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

https://github.com/JuliaCollections/IterTools.jl/blob/831bbd2c584c41af961df1b9ee8954d46e366621/src/IterTools.jl#L589

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.