-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
PERF: CategoricalDtype.__eq__ #36280
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
Conversation
self.categories.dtype == other.categories.dtype | ||
and self.categories.equals(other.categories) | ||
): | ||
left = self.categories |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a comment that the ordering of checks is for perf
): | ||
left = self.categories | ||
right = other.categories | ||
if not left.dtype == right.dtype: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is_dtype_equal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thatd require a circular import (actually id like to put is_dtype_equal "above" this file, but thats for another day)
Three special cases where we can get better performance