-
-
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
Handle non-const function in return_types
special case
#19667
Conversation
@nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @jrevels |
I could not reproduce any of the possible regressions locally. Best! |
Confirming the test case in #19633 (comment) succeeds on this branch: julia> baz() = (a = 1; Base._return_type((x, y) -> x + y + a, Base.Broadcast.typestuple(eye(4), eye(4))))
baz (generic function with 1 method)
julia> baz()
Float64
julia> @code_warntype baz()
Variables:
#self#::#baz
a::Int64
#3::##3#4{Int64}
Body:
begin
a::Int64 = 1
SSAValue(0) = Base._return_type
#3::##3#4{Int64} = $(Expr(:new, ##3#4{Int64}, :(a)))
SSAValue(1) = #3::##3#4{Int64}
$(Expr(:invoke, MethodInstance for eye(::Type{T}, ::Int64, ::Int64), :(Base.eye), :(Base.Float64), 4, 4))
$(Expr(:invoke, MethodInstance for eye(::Type{T}, ::Int64, ::Int64), :(Base.eye), :(Base.Float64), 4, 4))
SSAValue(2) = $(QuoteNode(Tuple{Float64,Float64}))
return $(QuoteNode(Float64))
end::Type{Float64} Best! |
ldexp, frexp, exponent, and significand are notoriously noisy. The functions are evaluated on scalars and take a few ns to finish. BenchmarkTools locally has ns resolution on my local pc, but perhaps not on the benchmarking server |
93bc498
to
b94d546
Compare
The latest BenchmarkTools tag has picosecond resolution (it will pretty-print in fractions of nanoseconds), but I still need to update Nanosoldier with that capability. |
Confirming that the test cases I've written against the code mentioned in the related discourse thread succeed on this branch. Best! |
Is this backportable? (@tkelman are there any backports planned for v0.5? we still haven't seen v0.5.1, but then again I haven't seen a lot of bugs either) |
b94d546
to
5a063ec
Compare
Rebased. AppVeyor failure is the intermittent libgit2 network issue..... @JeffBezanson @vtjnash |
…re cases. Re-simplify broadcast's eltype promotion mechanism as in JuliaLang#19421. With benefit of JuliaLang#19667, this simplified mechanism should handle additional cases (e.g. closures accepting more than two arguments). Also rename the mechanism more precisely (_broadcast_type -> _broadcast_eltype).
Ping @JeffBezanson @vtjnash |
…re cases. Re-simplify broadcast's eltype promotion mechanism as in JuliaLang#19421. With benefit of JuliaLang#19667, this simplified mechanism should handle additional cases (e.g. closures accepting more than two arguments). Also rename the mechanism more precisely (_broadcast_type -> _broadcast_eltype).
…re cases. Re-simplify broadcast's eltype promotion mechanism as in JuliaLang#19421. With benefit of JuliaLang#19667, this simplified mechanism should handle additional cases (e.g. closures accepting more than two arguments). Also rename the mechanism more precisely (_broadcast_type -> _broadcast_eltype).
…re cases. Re-simplify broadcast's eltype promotion mechanism as in JuliaLang#19421. With benefit of JuliaLang#19667, this simplified mechanism should handle additional cases (e.g. closures accepting more than two arguments). Also rename the mechanism more precisely (_broadcast_type -> _broadcast_eltype).
…re cases. Re-simplify broadcast's eltype promotion mechanism as in JuliaLang#19421. With benefit of JuliaLang#19667, this simplified mechanism should handle additional cases (e.g. closures accepting more than two arguments). Also rename the mechanism more precisely (_broadcast_type -> _broadcast_eltype).
…re cases. Re-simplify broadcast's eltype promotion mechanism as in JuliaLang#19421. With benefit of JuliaLang#19667, this simplified mechanism should handle additional cases (e.g. closures accepting more than two arguments). Also rename the mechanism more precisely (_broadcast_type -> _broadcast_eltype).
…re cases. Re-simplify broadcast's eltype promotion mechanism as in JuliaLang#19421. With benefit of JuliaLang#19667, this simplified mechanism should handle additional cases (e.g. closures accepting more than two arguments). Also rename the mechanism more precisely (_broadcast_type -> _broadcast_eltype, typestuple -> eltypestuple).
…re cases. Re-simplify broadcast's eltype promotion mechanism as in JuliaLang#19421. With benefit of JuliaLang#19667, this simplified mechanism should handle additional cases (e.g. closures accepting more than two arguments). Also rename the mechanism more precisely (_broadcast_type -> _broadcast_eltype, typestuple -> eltypestuple).
…re cases. (#19723) Re-simplify broadcast's eltype promotion mechanism as in #19421. With benefit of #19667, this simplified mechanism should handle additional cases (e.g. closures accepting more than two arguments). Also rename the mechanism more precisely (_broadcast_type -> _broadcast_eltype, typestuple -> eltypestuple).
Fix #19641