From 5ea1a4147abe51d33ecb7d2d88fcc1285003ef69 Mon Sep 17 00:00:00 2001 From: Lilith Orion Hafner Date: Sat, 22 Apr 2023 13:50:37 -0500 Subject: [PATCH] Remove unnecessary allocation in `BitSet()` (#49461) --- base/bitset.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/bitset.jl b/base/bitset.jl index d1acdb0e5176f..5ce07389c771e 100644 --- a/base/bitset.jl +++ b/base/bitset.jl @@ -15,7 +15,7 @@ mutable struct BitSet <: AbstractSet{Int} # 1st stored Int equals 64*offset offset::Int - BitSet() = new(sizehint!(zeros(UInt64, 0), 4), NO_OFFSET) + BitSet() = new(resize!(Vector{UInt64}(undef, 4), 0), NO_OFFSET) end """