Skip to content
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

performance regressions introduced by #42766 #42840

Closed
aviatesk opened this issue Oct 29, 2021 · 0 comments
Closed

performance regressions introduced by #42766 #42840

aviatesk opened this issue Oct 29, 2021 · 0 comments
Labels
compiler:optimizer Optimization passes (mostly in base/compiler/ssair/) performance Must go faster

Comments

@aviatesk
Copy link
Member

@vtjnash detected 1510eaa causes performance regressions, which appear as increased allocations.
I reduce them to:

using BenchmarkTools

include("$(ENV["JULIA_PKG_DEVDIR"])/BaseBenchmarks/src/utils/RandUtils.jl")
using .RandUtils

_abs(x) = abs(x)
_abs(::Nothing) = nothing

const VEC_LENGTH = 10000
T = Bool
S = T
X = Vector{Union{T, Nothing}}(Vector{T}(RandUtils.samerand(S, VEC_LENGTH)));
@benchmark broadcast(identity, $X)
@benchmark broadcast(_abs, $X)

From the output of @code_typed broadcast(identity, X), it seems like 1510eaa fails to resolve Base.Broadcast.copyto_nonleaf!(...) statically somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:optimizer Optimization passes (mostly in base/compiler/ssair/) performance Must go faster
Projects
None yet
Development

No branches or pull requests

1 participant