Merged
Conversation
CodSpeed Performance ReportMerging #1310 will improve performances by 63.24%Comparing Summary
Benchmarks breakdown
|
hynek
reviewed
Jul 20, 2024
hynek
reviewed
Jul 20, 2024
Contributor
|
You might want to update the comment above those lines that says we can't do exactly what we're doing now 😄 Lines 1535 to 1536 in 13e9a6a |
hynek
added a commit
that referenced
this pull request
Nov 16, 2024
Member
thanks, it's so hard to find quality free labor 🤪 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Create the
__eq__as a chain of ANDed comparisons, instead of a tuple.On my computer, a class with two attributes now compares almost twice as fast: 141 ns vs 222 ns.
This will introduce a very slight incompatibility which I think is worth it for us (and dataclasses already introduced): attributes that compare equal by identity but not by value (= NaNs) will behave differently.