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: Use downcast_ref instead of dtype equality in <dyn SeriesTrait as AsRef<ChunkedArray<T>> #20664

Merged
merged 4 commits into from
Jan 10, 2025

Conversation

coastalwhite
Copy link
Collaborator

This sped up concat by ~2x for me.

@github-actions github-actions bot added performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars labels Jan 10, 2025
@coastalwhite coastalwhite changed the title perf: Use downcast_ref instead of dtype equality in SeriesTrait AsRef perf: Use downcast_ref instead of dtype equality in <dyn SeriesTrait as AsRef<ChunkedArray<T>> Jan 10, 2025
Copy link

codecov bot commented Jan 10, 2025

Codecov Report

Attention: Patch coverage is 23.43750% with 49 lines in your changes missing coverage. Please review.

Project coverage is 78.95%. Comparing base (92fd75d) to head (d681241).
Report is 31 commits behind head on main.

Files with missing lines Patch % Lines
crates/polars-core/src/series/mod.rs 44.44% 10 Missing ⚠️
...s/polars-core/src/series/implementations/binary.rs 0.00% 3 Missing ⚠️
...s-core/src/series/implementations/binary_offset.rs 0.00% 3 Missing ⚠️
.../polars-core/src/series/implementations/boolean.rs 0.00% 3 Missing ⚠️
...ars-core/src/series/implementations/categorical.rs 0.00% 3 Missing ⚠️
...tes/polars-core/src/series/implementations/date.rs 0.00% 3 Missing ⚠️
...polars-core/src/series/implementations/datetime.rs 0.00% 3 Missing ⚠️
.../polars-core/src/series/implementations/decimal.rs 0.00% 3 Missing ⚠️
...polars-core/src/series/implementations/duration.rs 0.00% 3 Missing ⚠️
...tes/polars-core/src/series/implementations/null.rs 0.00% 3 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20664      +/-   ##
==========================================
- Coverage   79.00%   78.95%   -0.05%     
==========================================
  Files        1566     1557       -9     
  Lines      221034   220778     -256     
  Branches     2510     2527      +17     
==========================================
- Hits       174618   174314     -304     
- Misses      45842    45886      +44     
- Partials      574      578       +4     

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

@ritchie46 ritchie46 merged commit 94b4087 into pola-rs:main Jan 10, 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.

2 participants