Closed
Description
Consider:
julia> code_lowered(Val{1}, Tuple{})
1-element Vector{Core.CodeInfo}:
CodeInfo(
1 ─ %1 = Core.apply_type(Base.Val, $(Expr(:static_parameter, 1)))
│ %2 = %new(%1)
└── return %2
)
A better lowering would be new(_1)
, since that would save the extra apply_type and save some inference time. Even better if signature itself doesn't have a static parameter anymore, since inference is more comfortable with that.
Metadata
Metadata
Assignees
Labels
No labels