From 68a24a22790b2d17719ef5cd6362b827501e95f9 Mon Sep 17 00:00:00 2001 From: Moelf Date: Wed, 23 Oct 2024 16:24:33 +0200 Subject: [PATCH] reduce allocation in Record array construction --- src/all_implementations.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/all_implementations.jl b/src/all_implementations.jl index 6c159e1..8ea511b 100644 --- a/src/all_implementations.jl +++ b/src/all_implementations.jl @@ -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, )