Skip to content

performance regressions introduced by #42766 #42840

@aviatesk

Description

@aviatesk
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.

Activity

added 2 commits that reference this issue on Oct 29, 2021
7b792ca
5abfc25
added 2 commits that reference this issue on Oct 29, 2021
83bd616
382129f
added a commit that references this issue on Feb 22, 2022
9ba584d
added a commit that references this issue on Mar 8, 2022
e5af603
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    compiler:optimizerOptimization passes (mostly in base/compiler/ssair/)performanceMust go faster

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @aviatesk

        Issue actions

          performance regressions introduced by #42766 · Issue #42840 · JuliaLang/julia