Skip to content

Commit

Permalink
reduce allocation in Record array construction
Browse files Browse the repository at this point in the history
  • Loading branch information
Moelf committed Oct 23, 2024
1 parent 6ba1c4a commit 68a24a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/all_implementations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1931,11 +1931,11 @@ RecordArray(
behavior::Symbol = :default,
) where {FIELDS,CONTENTS<:Base.Tuple{Vararg{Content}}} = RecordArray(
contents,
minimum(if length(contents) == 0
if isempty(contents)
0
else
[length(x) for x in contents]
end),
minimum(length, contents)
end,
parameters = parameters,
behavior = behavior,
)
Expand Down

0 comments on commit 68a24a2

Please sign in to comment.