Skip to content

Commit

Permalink
Avoid constructing an array only to splat it to make a tuple in tuple…
Browse files Browse the repository at this point in the history
…_tfunc (#36926)

* Avoid constructing an array only to splat it to make a tuple in tuple_tfunc

* use ntuple
  • Loading branch information
oxinabox committed Aug 12, 2020
1 parent 06b7f0b commit fedde78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/compiler/tfuncs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,7 @@ function tuple_tfunc(atypes::Vector{Any})
end
end
if all_are_const
return Const(tuple(Any[atypes[i].val for i in 1:length(atypes)]...))
return Const(ntuple(i -> atypes[i].val, length(atypes)))
end
params = Vector{Any}(undef, length(atypes))
anyinfo = false
Expand Down

2 comments on commit fedde78

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

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

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

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

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan

Please sign in to comment.