Skip to content

perf: Add first_(true|false)_idx to BooleanChunked and use in bool arg_(min|max) #22907

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
merged 6 commits into from
May 25, 2025

Conversation

orlp
Copy link
Member

@orlp orlp commented May 23, 2025

This should be a lot faster if an array has nulls, or more than 1 chunk.

cc @alexander-beedie

@orlp orlp requested review from ritchie46 and c-peters as code owners May 23, 2025 14:39
@github-actions github-actions bot added performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars labels May 23, 2025
@coastalwhite
Copy link
Collaborator

Could you maybe replace the impl of index_of with this? It looks quite similar.

Copy link

codecov bot commented May 23, 2025

Codecov Report

Attention: Patch coverage is 88.46154% with 6 lines in your changes missing coverage. Please review.

Project coverage is 80.68%. Comparing base (5993d95) to head (be6cfce).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
crates/polars-core/src/chunked_array/ops/bits.rs 86.04% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #22907      +/-   ##
==========================================
+ Coverage   80.66%   80.68%   +0.02%     
==========================================
  Files        1672     1672              
  Lines      221997   221916      -81     
  Branches     2798     2798              
==========================================
- Hits       179065   179057       -8     
+ Misses      42265    42193      -72     
+ Partials      667      666       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@orlp orlp force-pushed the first-true-false-idx branch from b29e5ae to be6cfce Compare May 23, 2025 15:02
@orlp
Copy link
Member Author

orlp commented May 23, 2025

@coastalwhite Oh, haha, great minds think alike :)

@ritchie46 ritchie46 merged commit 7dc4f02 into pola-rs:main May 25, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants