Skip to content

Conversation

AayushSabharwal
Copy link
Contributor

@AayushSabharwal AayushSabharwal commented Sep 20, 2025

I also removed the ::Nothing method since it was invalidating, and if I understand correctly it was necessary due to the ::Any methods.

Base.isequal(α, q::RationalPoly) = isequal* q.den, q.num)
Base.isequal(q::RationalPoly, α) = isequal(α, q)
Base.isequal::Union{Number,MA.AbstractMutable,AbstractArray}, q::RationalPoly) = isequal* q.den, q.num)
Base.isequal(q::RationalPoly, α::Union{Number,MA.AbstractMutable,AbstractArray}) = isequal(α, q)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Define this Union as a const const _Constant

@AayushSabharwal AayushSabharwal force-pushed the as/improve-invalidations branch 2 times, most recently from 9738765 to ed52a33 Compare September 20, 2025 20:55
@blegat
Copy link
Member

blegat commented Sep 22, 2025

Is the support of AbstractArray also causing invalidations ?

@AayushSabharwal
Copy link
Contributor Author

AayushSabharwal commented Sep 22, 2025

No, that part is fine. The only other invalidations from this dependency tree are

inserting *(z::MutableArithmetics.Zero, ::Any) @ MutableArithmetics ~/.julia/packages/MutableArithmetics/PcwmY/src/rewrite.jl:61 invalidated:
   mt_backedges: 1: signature Tuple{typeof(*), Any, String} triggered MethodInstance for Base.Precompilation._precompilepkgs(::Vector{String}, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Vector{Pair{Cmd, Base.CacheFlags}}, ::IOContext{IO}, ::Bool, ::Bool) (0 children)

inserting +(x, ::MutableArithmetics.Zero) @ MutableArithmetics ~/.julia/packages/MutableArithmetics/PcwmY/src/rewrite.jl:65 invalidated:
   mt_backedges: 1: signature Tuple{typeof(+), Ptr{UInt16}, Any} triggered MethodInstance for Base._copyfrompacked!(::Ptr, ::Ptr{UInt16}) (1 children)
                 2: signature Tuple{typeof(+), Ptr{Tuple{UInt8, UInt8}}, Any} triggered MethodInstance for Base._copyfrompacked!(::Ptr, ::Ptr{Tuple{UInt8, UInt8}}) (1 children)

inserting step(r::MutableArithmetics.MutatingStepRange) @ MutableArithmetics ~/.julia/packages/MutableArithmetics/PcwmY/src/implementations/MutatingStepRange.jl:25 invalidated:
   mt_backedges: 1: signature Tuple{typeof(step), OrdinalRange{Int64, Int64}} triggered MethodInstance for Base.IteratorsMD.__inc(::Tuple{Int64, Int64, Vararg{Int64}}, ::Tuple{OrdinalRange{Int64, Int64}, OrdinalRange{Int64, Int64}, Vararg{OrdinalRange{Int64, Int64}}}) (0 children)
                 2: signature Tuple{typeof(step), OrdinalRange{Int64, Int64}} triggered MethodInstance for (::Base.IteratorsMD.var"#23#25")(::OrdinalRange{Int64, Int64}) (3 children)
                 3: signature Tuple{typeof(step), OrdinalRange{Int64, Int64}} triggered MethodInstance for Base.IteratorsMD.__inc(::Tuple{Int64}, ::Tuple{OrdinalRange{Int64, Int64}}) (5 children)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants