Skip to content

Conversation

KristofferC
Copy link
Member

No description provided.

vtjnash and others added 2 commits July 13, 2025 10:30
Store full method interference relationship graph in interferences field
of Method to avoid expensive morespecific calls during dispatch. This
provides significant performance improvements:
  - Replace method comparisons with precomputed interference lookup.
  - Optimize ml_matches minmax computation using interference lookups.
  - Optimize sort_mlmatches for large return sets by iterating over
    interferences instead of all matching methods.
  - Add method_morespecific_via_interferences in both C and Julia.

This representation may exclude some edges that are implied by
transitivity since sort_mlmatches will ensure the correct result by
following strong edges. Ambiguous edges are guaranteed to be checkable
without recursion.

Also fix a variety of bugs along the way:
 - Builtins signature would cause them to try to discard all other
   methods during `sort_mlmatches`.
 - Some ambiguities were over-estimated, which now are improved upon.
 - Setting lim==-1 now gives the same limited list of methods as lim>0,
   since that is actually faster now than attempting to give the
   unsorted list. This provides a better fix to #53814 than #57837 and
   fixes #58766.
 - Reverts recent METHOD_SIG_LATEST_HAS_NOTMORESPECIFIC attempt (though
   not the whole commit), since I found a significant problem with any
   usage of that bit during testing: it only tracks methods that
   intersect with a target, but new methods do not necessarily intersect
   with any existing target.

This provides a decent performance improvement to `methods` calls, which
implies a decent speed up to package loading also (e.g. ModelingToolkit
loads in about 4 seconds instead of 5 seconds).

(cherry picked from commit 521699c)
@KristofferC KristofferC added the backport 1.12 Change should be backported to release-1.12 label Jul 13, 2025
@KristofferC
Copy link
Member Author

@nanosoldier runtests(; priority="high")

@KristofferC

This comment was marked as outdated.

@nanosoldier

This comment was marked as outdated.

@KristofferC
Copy link
Member Author

@nanosoldier runtests(vs=":release-1.12", priority="high")

@nanosoldier
Copy link
Collaborator

The package evaluation job you requested has completed - possible new issues were detected.
The full report is available.

Report summary

❗ Packages that crashed

65 packages crashed only on the current version.

  • The process was aborted: 63 packages
  • An internal error was encountered: 2 packages

40 packages crashed on the previous version too.

✖ Packages that failed

51 packages failed only on the current version.

  • Package fails to precompile: 8 packages
  • Package has test failures: 5 packages
  • Package tests unexpectedly errored: 2 packages
  • Tests became inactive: 1 packages
  • Test duration exceeded the time limit: 17 packages
  • Test log exceeded the size limit: 18 packages

3541 packages failed on the previous version too.

✔ Packages that passed tests

51 packages passed tests only on the current version.

  • Other: 51 packages

5590 packages passed tests on the previous version too.

➖ Packages that were skipped altogether

6 packages were skipped only on the current version.

  • Package could not be installed: 6 packages

1384 packages were skipped on the previous version too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.12 Change should be backported to release-1.12
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants