-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
zip() has limits: bug or needs documenting? #20615
Comments
I did some digging on this. If I annotate julia> A = 1:2;
julia> zw = zip(A, A, A, A, A, A, A, A, A, A, A); # this length work on master
julia> z = zip(A, A, A, A, A, A, A, A, A, A, A, A); # does not work on master
julia> start(z)
(1, (1, (1, (1, (1, (1, (1, (1, (1, (1, (1, 1))))))))))) Too much inlining when the (It was a bit confusing debugging this, since |
Did some benchmarking and using
Could it be worth introducing |
Related: Lines 128 to 140 in cb1aae9
|
Doing |
Looking closer at the SSAValue(0) = (Core.getfield)(z::Base.Iterators.Zip{UnitRange{Int64},Base.Iterators.Zip{UnitRange{Int64},Base.Iterators.Zip{UnitRange{Int64},Base.Iterators.Zip{UnitRange{Int64},Base.Iterators.Zip{UnitRange{Int64},Base.Iterators.Zip{UnitRange{Int64},Base.Iterators.Zip{UnitRange{Int64},Base.Iterators.Zip{UnitRange{Int64},Base.Iterators.Zip{UnitRange{Int64},Base.Iterators.Zip{UnitRange{Int64},Base.Iterators.Zip2{UnitRange{Int64},UnitRange{Int64}}}}}}}}}}}}, :z)::Base.Iterators.Zip{UnitRange{Int64},Base.Iterators.Zip{UnitRange{Int64},Base.Iterators.Zip{UnitRange{Int64},Base.Iterators.Zip{UnitRange{Int64},Base.Iterators.Zip{UnitRange{Int64},Base.Iterators.Zip{UnitRange{Int64},Base.Iterators.Zip{UnitRange{Int64},Base.Iterators.Zip{UnitRange{Int64},Base.Iterators.Zip{_,_}}}}}}}}} where _<:Base.Iterators.Zip2 near the top. The innermost type here is |
Looks like a bug in julia> T=Core.Inference.limit_type_depth(typeof(z.z), 0);
julia> T.var
_<:Base.Iterators.Zip2
julia> T2 = T.body.types[2].types[2].types[2].types[2].types[2].types[2].types[2].types[2]
Base.Iterators.Zip{_<:Base.Iterators.Zip2,_<:Base.Iterators.Zip2}
julia> T2.parameters[1] === T2.parameters[2]
true Obviously, this would need to be two different |
This works on v0.5 actually: start(zip(ntuple(i->1:2, N)...)) for arbitrary |
@fredrikekre Yes, the bug started to occur when I started Travis testing on v0.6. |
|
Travis found this bug for me on 0.6: It seems that
zip()
can handle up to a certain number of inputs, then complains.Version
The text was updated successfully, but these errors were encountered: