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

PERF-#6979: Do not trigger '._copartition()' for identical indices on binary operations #6980

Merged
merged 1 commit into from Feb 29, 2024

Conversation

dchigarev
Copy link
Collaborator

@dchigarev dchigarev commented Feb 28, 2024

What do these changes do?

Check axes equality at the beginning of ._copartition() method using ._check_if_axes_identical(), that supports computation-free comparison for sibling frames.

  • first commit message and PR title follow format outlined here

    NOTE: If you edit the PR title to match this format, you need to add another commit (even if it's empty) or amend your last commit for the CI job that checks the PR title to pick up the new PR title.

  • passes flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
  • passes black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
  • signed commit with git commit -s
  • Resolves Unnecessary ._copartition() on binary operations #6979
  • tests added and passing
  • module layout described at docs/development/architecture.rst is up-to-date

…al indices on binary operations

Signed-off-by: Dmitry Chigarev <dmitry.chigarev@intel.com>
Copy link
Collaborator

@anmyachev anmyachev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

@anmyachev anmyachev merged commit b3e79ed into modin-project:master Feb 29, 2024
37 checks passed
the frames are empty.
"""
if isinstance(other, type(self)):
other = [other]

if not force_repartition and all(
o._check_if_axes_identical(self, axis) for o in other
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o._check_if_axes_identical(self, axis) for o in other -> self._check_if_axes_identical(o, axis) for o in other? I am just wondering why the logic is inverted a bit?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's no reason for this, both of the options would perform identically

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

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.

Unnecessary ._copartition() on binary operations
3 participants