Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - chore(algebra/group/defs): Remove shortcut instance definitions #4955

Closed
wants to merge 1 commit into from

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Nov 9, 2020

This means that group.to_left_cancel_semigroup is now spelt group.to_cancel_monoid.to_left_cancel_monoid.to_left_cancel_semigroup.
The longer spelling shouldn't actually matter because type inference will do it anyway.

I don't know whether this matters, but this should slightly reduce the number of connections that instance resolution must check.

This shortcut wasn't added deliberately, it seems it just got added accidentally when #3688 was introduced.


This means that `group.to_left_cancel_semigroup` is now spelt `group.to_cancel_monoid.to_left_cancel_monoid.to_left_cancel_semigroup`.

I don't know whether this matters, but this should slightly reduce the number of connections that instance resolution must check
@eric-wieser eric-wieser added the awaiting-review The author would like community review of the PR label Nov 9, 2020
@eric-wieser eric-wieser changed the title chore(*): Remove shortcut instance definitions chore(algebra/group/defs): Remove shortcut instance definitions Nov 9, 2020
@eric-wieser
Copy link
Member Author

@digama0, I think I remember you saying on zulip that these extra "shortcut" diamonds made type resolution slower, not faster?

@Vierkantor
Copy link
Collaborator

Sorry for the delayed review, I was very busy yesterday. Mario indeed said shortcut instances are incredibly bad for the algorithm. So this should improve performance a bit.

bors r+

bors bot pushed a commit that referenced this pull request Nov 19, 2020
This means that `group.to_left_cancel_semigroup` is now spelt `group.to_cancel_monoid.to_left_cancel_monoid.to_left_cancel_semigroup`.
The longer spelling shouldn't actually matter because type inference will do it anyway.

I don't know whether this matters, but this should slightly reduce the number of connections that instance resolution must check.

This shortcut wasn't added deliberately, it seems it just got added accidentally when #3688 was introduced.
@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Nov 19, 2020
@bors
Copy link

bors bot commented Nov 19, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title chore(algebra/group/defs): Remove shortcut instance definitions [Merged by Bors] - chore(algebra/group/defs): Remove shortcut instance definitions Nov 19, 2020
@bors bors bot closed this Nov 19, 2020
@bors bors bot deleted the eric-wieser/cancel-monoid branch November 19, 2020 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants