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

Reimplementation of NestedFrame.reduce() #96

Merged
merged 2 commits into from
May 30, 2024
Merged

Reimplementation of NestedFrame.reduce() #96

merged 2 commits into from
May 30, 2024

Conversation

hombit
Copy link
Collaborator

@hombit hombit commented May 30, 2024

Here is a re-implementation of reduce without using df.join and df.assign. It is shorter and runs faster

@hombit hombit requested a review from wilsonbb May 30, 2024 14:29
Copy link

codecov bot commented May 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.76%. Comparing base (aadb12f) to head (fc0b320).
Report is 59 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #96   +/-   ##
=======================================
  Coverage   98.76%   98.76%           
=======================================
  Files          15       15           
  Lines         894      894           
=======================================
  Hits          883      883           
  Misses         11       11           

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

Copy link

Before [aadb12f] After [5fb69b5] Ratio Benchmark (Parameter)
31.2±1ms 32.5±2ms 1.04 benchmarks.AssignSingleDfToNestedSeries.time_run
88.2M 90.2M 1.02 benchmarks.NestedFrameQuery.peakmem_run
8.97±0.1ms 9.01±0.1ms 1.01 benchmarks.NestedFrameAddNested.time_run
257M 257M 1 benchmarks.AssignSingleDfToNestedSeries.peakmem_run
84M 84M 1 benchmarks.NestedFrameAddNested.peakmem_run
6.30±0.08ms 6.30±0.1ms 1 benchmarks.NestedFrameQuery.time_run
87.2M 87.2M 1 benchmarks.NestedFrameReduce.peakmem_run
277M 277M 1 benchmarks.ReassignHalfOfNestedSeries.peakmem_run
62.8±2ms 60.0±1ms 0.96 benchmarks.ReassignHalfOfNestedSeries.time_run
5.20±0.03ms 1.06±0ms 0.2 benchmarks.NestedFrameReduce.time_run

Click here to view all benchmarks.

Copy link
Contributor

@wilsonbb wilsonbb left a comment

Choose a reason for hiding this comment

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

This looks cool, thanks for this!

@hombit hombit merged commit 82fe541 into main May 30, 2024
11 checks passed
@hombit hombit deleted the reduce-reimpl branch May 30, 2024 15:28
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.

2 participants