Skip to content

Conversation

compiler-errors
Copy link

rustc wants to use derivative to simplify PartialEq derives, but encounters a pretty significant perf hit because the derivative(PartialEq) impl will add a discriminant comparison first, unlike our hand-rolled implementations.

This PR adds a PartialEq = "skip_discriminant" mode to skip generating an initial discriminant comparison so that rustc can derive more tailored PartialEq implementations for derivative. This is proven to work.

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.

1 participant