Skip to content

BENCH: Improve perf of rolling.Apply.time_rolling #29239

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 1 commit into from
Oct 28, 2019

Conversation

qwhelan
Copy link
Contributor

@qwhelan qwhelan commented Oct 26, 2019

Per discussion in #29165, this PR significantly reduces the run time of the rolling.Apply.time_rolling benchmark from 8 minutes minimum.

$ asv dev -b rolling.Apply.time_rolling
· Discovering benchmarks
· Running 1 total benchmarks (1 commits * 1 environments * 1 benchmarks)
[  0.00%] ·· Benchmarking existing-py_home_chris_anaconda3_bin_python
[ 50.00%] ··· Running (rolling.Apply.time_rolling--).
[100.00%] ··· rolling.Apply.time_rolling                                                                                                                                                                  ok
[100.00%] ··· ============= ======== ======= =========================== ============= ============
              --                                                                    raw            
              ---------------------------------------------------------- --------------------------
               constructor   window   dtype            function               True        False    
              ============= ======== ======= =========================== ============= ============
                DataFrame      3       int     <built-in function sum>     1.87±0.1ms    44.8±2ms  
                DataFrame      3       int          <function sum>         3.53±0.2ms    126±3ms   
                DataFrame      3       int    <function Apply.<lambda>>    4.20±0.2ms    126±7ms   
                DataFrame      3      float    <built-in function sum>    1.86±0.07ms    45.1±1ms  
                DataFrame      3      float         <function sum>        3.42±0.03ms    129±5ms   
                DataFrame      3      float   <function Apply.<lambda>>    4.34±0.5ms    133±9ms   
                DataFrame     300      int     <built-in function sum>      31.8±3ms     44.1±2ms  
                DataFrame     300      int          <function sum>         2.90±0.2ms   92.6±10ms  
                DataFrame     300      int    <function Apply.<lambda>>    3.24±0.2ms    93.9±4ms  
                DataFrame     300     float    <built-in function sum>     33.3±20ms    85.4±40ms  
                DataFrame     300     float         <function sum>         3.06±0.3ms    91.0±3ms  
                DataFrame     300     float   <function Apply.<lambda>>    3.19±0.2ms    91.5±4ms  
                  Series       3       int     <built-in function sum>    1.42±0.03ms    43.6±1ms  
                  Series       3       int          <function sum>        3.08±0.06ms    127±2ms   
                  Series       3       int    <function Apply.<lambda>>    3.67±0.2ms    127±20ms  
                  Series       3      float    <built-in function sum>    1.41±0.03ms   43.5±0.5ms 
                  Series       3      float         <function sum>         3.08±0.1ms    123±3ms   
                  Series       3      float   <function Apply.<lambda>>    3.65±0.1ms    129±6ms   
                  Series      300      int     <built-in function sum>      31.2±2ms     43.8±3ms  
                  Series      300      int          <function sum>         2.35±0.1ms    90.4±4ms  
                  Series      300      int    <function Apply.<lambda>>    2.74±0.2ms    93.2±6ms  
                  Series      300     float    <built-in function sum>     31.7±0.8ms    45.6±1ms  
                  Series      300     float         <function sum>         2.36±0.1ms    108±20ms  
                  Series      300     float   <function Apply.<lambda>>   2.82±0.09ms    99.4±2ms  
              ============= ======== ======= =========================== ============= ============
  • closes #xxxx
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

@jreback jreback added the Performance Memory or execution speed performance label Oct 28, 2019
@jreback jreback added this to the 1.0 milestone Oct 28, 2019
@jreback jreback merged commit f973356 into pandas-dev:master Oct 28, 2019
@jreback
Copy link
Contributor

jreback commented Oct 28, 2019

thanks @qwhelan

@WillAyd
Copy link
Member

WillAyd commented Oct 28, 2019

This is great thanks for this. Just out of curiosity, what were you aiming for time-wise on these?

HawkinsBA pushed a commit to HawkinsBA/pandas that referenced this pull request Oct 29, 2019
Reksbril pushed a commit to Reksbril/pandas that referenced this pull request Nov 18, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants