Splatting of an integer

Looks like this discrepancy is gone on version 1.6:

1.5:

julia> mancellin2(a, i) = getindex(a, i...)

julia> @btime mancellin2(a, i) setup = (a = [1 2 3 4; 5 6 7 8]; i = (3, ))
  1.971 ns (0 allocations: 0 bytes)

julia> @btime mancellin2(a, i) setup = (a = [1 2 3 4; 5 6 7 8]; i = 3)
  139.657 ns (2 allocations: 32 bytes)

1.6:

julia> @btime mancellin2(a, i) setup = (a = [1 2 3 4; 5 6 7 8]; i = (3, ))
  1.981 ns (0 allocations: 0 bytes)

julia> @btime mancellin2(a, i) setup = (a = [1 2 3 4; 5 6 7 8]; i = 3)
  1.972 ns (0 allocations: 0 bytes)
2 Likes