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: Generalize the arg_sort fast path onto Column #20437

Merged

Conversation

coastalwhite
Copy link
Collaborator

@coastalwhite coastalwhite commented Dec 24, 2024

This makes the implementation of arg_sort take the fast path in Column before ever going into a specific SeriesTrait implementor. This now makes that every type has the same fast path that gets taken when sorted. It also now allows taking the fast path when maintain_order=True.

This PR needed to adjust some tests because they wrongly assumed things about the output order of the sorting when maintain_order=False.

There are some streaming tests that need to be disabled because of #20440.

This makes the implementation of `arg_sort` take the fast path in `Column`
before ever going into a specific SeriesTrait implementor. This now makes that
every type has the same fast path that gets taken when sorted. It also now
allows taking the fast path when `maintain_order=True`.

This PR needed to adjust some tests because they wrongly assumed things about
the output order of the sorting when `maintain_order=False`.
@coastalwhite coastalwhite changed the title perf: Generalize the arg_sort fast path onto Column. perf: Generalize the arg_sort fast path onto Column Dec 24, 2024
@github-actions github-actions bot added performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars and removed title needs formatting labels Dec 24, 2024
Copy link

codecov bot commented Dec 24, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 21 lines in your changes missing coverage. Please review.

Project coverage is 79.00%. Comparing base (93ceacc) to head (d569b9e).
Report is 29 commits behind head on main.

Files with missing lines Patch % Lines
crates/polars-core/src/frame/column/mod.rs 83.33% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20437      +/-   ##
==========================================
- Coverage   79.01%   79.00%   -0.02%     
==========================================
  Files        1562     1563       +1     
  Lines      220177   220463     +286     
  Branches     2488     2488              
==========================================
+ Hits       173980   174181     +201     
- Misses      45624    45709      +85     
  Partials      573      573              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ritchie46 ritchie46 merged commit a6fffd4 into pola-rs:main Dec 25, 2024
27 checks passed
@coastalwhite coastalwhite deleted the perf/generalize-arg-sort-sorted-path branch December 25, 2024 15:15
@c-peters c-peters added the accepted Ready for implementation label Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants