Set max_methods to 1 for merge/merge!/mergewith/mergewith!#61330
Set max_methods to 1 for merge/merge!/mergewith/mergewith!#61330oscardssmith merged 1 commit intoJuliaLang:masterfrom
Conversation
aviatesk
left a comment
There was a problem hiding this comment.
The original invalidation issue can occur generally for any package that overloads AbstractDict no matter if they implement the overload appropriately, so I believe it needs to be fixed on the Base side.
Setting @max_methods 1 may weaken inference capabilities, but the code affected by this would be type-unstable anyway, so such performance issues should generally be addressed on the package side. There is also a discussion about making @max_methods 1 the global default, which could have a significant impact on the ecosystem. However, I don't see much of a problem with introducing it in a limited fashion for code where actual issues are occurring.
That would be amazing, modulo performance hits 😅 I feel like otherwise we'll end up setting |
|
I'll merge this in a few days if there's no objections. |
Should prevent these invalidations seen when loading CurveFit.jl on 1.13:
Partial alternative to #61329. I added
mergewith()andmergewith!()to be on the safe side.