Skip to content

Invalidations from isequal #488

Description

@MilesCranmer

This line:

Base.isequal(x::AbstractString, y::PtrString) = y == x

is currently invalidating a large fraction of SymbolicRegression.jl's precompiled code.

As far as I can tell, the Base.isequal overloads here are unnecessary. Base.isequal(x, y) already falls back to (x == y)::Bool, and JSON.jl already defines the corresponding == methods for PtrString and AbstractString.

In particular, the broad

Base.isequal(x::AbstractString, y::PtrString)

method causes a very large invalidation cascade when JSON.jl is loaded. I lose 926 methods.

FYI @quinnj

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions