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: Broadcast without materialization in concat_arr #20681

Merged
merged 3 commits into from
Jan 13, 2025

Conversation

nameexhaustion
Copy link
Collaborator

@nameexhaustion nameexhaustion commented Jan 13, 2025

We were accidentally materializing due to using as_materialized_series() / c.array() (which underneath does .as_materialized_series().

Also adjusts some slicing operations for the Scalar column variant to avoid taking refcounts to materialized Series when slicing to 0 or unit-length.

@github-actions github-actions bot added performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars labels Jan 13, 2025
Copy link

codspeed-hq bot commented Jan 13, 2025

CodSpeed Performance Report

Merging #20681 will improve performances by 34.72%

Comparing nameexhaustion:concat-arr-scalar-opt (9d7f1c3) with main (dd9a180)

Summary

⚡ 2 improvements
✅ 39 untouched benchmarks

Benchmarks breakdown

Benchmark main nameexhaustion:concat-arr-scalar-opt Change
test_groupby_h2oai_q6 12 ms 9.4 ms +27.29%
test_pdsh_q21 190.6 ms 141.5 ms +34.72%

Copy link

codecov bot commented Jan 13, 2025

Codecov Report

Attention: Patch coverage is 92.06349% with 5 lines in your changes missing coverage. Please review.

Project coverage is 79.03%. Comparing base (0c3c89a) to head (9d7f1c3).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
crates/polars-ops/src/series/ops/concat_arr.rs 91.52% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20681      +/-   ##
==========================================
+ Coverage   79.00%   79.03%   +0.03%     
==========================================
  Files        1559     1559              
  Lines      221216   221237      +21     
  Branches     2529     2529              
==========================================
+ Hits       174765   174862      +97     
+ Misses      45872    45794      -78     
- Partials      579      581       +2     

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

@nameexhaustion nameexhaustion marked this pull request as ready for review January 13, 2025 09:37
@ritchie46 ritchie46 merged commit ce3904d into pola-rs:main Jan 13, 2025
27 checks passed
@nameexhaustion nameexhaustion self-assigned this Jan 13, 2025
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.

2 participants