Revision 513336aadf636ef703dfea5f0ee1a26f78bd86c8 authored by Gabriel Baraldi on 14 August 2023, 12:43:41 UTC, committed by GitHub on 14 August 2023, 12:43:41 UTC
vchuravy noted that we don't set these flags even when building locally, even though we set the sysimg to `native`. This probably doesn't make too much of a difference but it might save a couple % on from source builds. Also add the option to set `mtune` which is what GCC wants
1 parent 95c9ddd
idset.jl
# This file is a part of Julia. License is MIT: https://julialang.org/license
# Like Set, but using IdDict
mutable struct IdSet{T} <: AbstractSet{T}
dict::IdDict{T,Nothing}
IdSet{T}() where {T} = new(IdDict{T,Nothing}())
IdSet{T}(s::IdSet{T}) where {T} = new(copy(s.dict))
end
IdSet{T}(itr) where {T} = union!(IdSet{T}(), itr)
IdSet() = IdSet{Any}()
copymutable(s::IdSet) = typeof(s)(s)
emptymutable(s::IdSet{T}, ::Type{U}=T) where {T,U} = IdSet{U}()
copy(s::IdSet) = typeof(s)(s)
isempty(s::IdSet) = isempty(s.dict)
length(s::IdSet) = length(s.dict)
in(@nospecialize(x), s::IdSet) = haskey(s.dict, x)
push!(s::IdSet, @nospecialize(x)) = (s.dict[x] = nothing; s)
pop!(s::IdSet, @nospecialize(x)) = (pop!(s.dict, x); x)
pop!(s::IdSet, @nospecialize(x), @nospecialize(default)) = (x in s ? pop!(s, x) : default)
delete!(s::IdSet, @nospecialize(x)) = (delete!(s.dict, x); s)
sizehint!(s::IdSet, newsz) = (sizehint!(s.dict, newsz); s)
empty!(s::IdSet) = (empty!(s.dict); s)
filter!(f, d::IdSet) = unsafe_filter!(f, d)
function iterate(s::IdSet, state...)
y = iterate(s.dict, state...)
y === nothing && return nothing
((k, _), i) = y
return (k, i)
end
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...