-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
good first issueIndicates a good issue for first-time contributors to JuliaIndicates a good issue for first-time contributors to Juliaobservabilitymetrics, timing, understandability, reflection, logging, ...metrics, timing, understandability, reflection, logging, ...
Description
MWE:
mutable struct B
x::Union{Float64, Tuple{Float64, Float64}}
y::Union{Float64, Tuple{Float64, Float64}}
end
ex = B[B(rand(), (rand(),rand())) for _ in 1:10^5];
now if you execute:
julia> Base.summarysize(ex)
7776776
julia> Base.summarysize(ex)
7820648
julia> Base.summarysize(ex)
7923000
julia> Base.summarysize(ex)
7911824
This can become very extreme in some situation, I saw a 2x difference between runs on a more complex vector of structs.
Tested in 1.10 and nightly, same behaviour
Metadata
Metadata
Assignees
Labels
good first issueIndicates a good issue for first-time contributors to JuliaIndicates a good issue for first-time contributors to Juliaobservabilitymetrics, timing, understandability, reflection, logging, ...metrics, timing, understandability, reflection, logging, ...