Skip to content

Commit

Permalink
Remove unnecessary allocation in BitSet() (#49461)
Browse files Browse the repository at this point in the history
  • Loading branch information
LilithHafner authored Apr 22, 2023
1 parent 3198159 commit 5ea1a41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/bitset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

"""
Expand Down

0 comments on commit 5ea1a41

Please sign in to comment.