Skip to content

CLN: Removed Unnecessary Conditionals in groupby_helper #19734

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
Feb 18, 2018

Conversation

WillAyd
Copy link
Member

@WillAyd WillAyd commented Feb 17, 2018

ASV results are pretty inconsistent but I couldn't find anything directly related from this change. Of the marks below, only max was touched by this change, and that doesn't appear consistently in the results

       before           after         ratio
     [2fdf1e25]       [458210c1]
+         155±1μs          173±4μs     1.12  groupby.GroupByMethods.time_method('float', 'max')
+         324±1μs          361±5μs     1.12  groupby.GroupByMethods.time_method('float', 'median')
-         722±5μs          638±8μs     0.88  groupby.GroupByMethods.time_method('int', 'cumprod')
-        540±10μs          463±1μs     0.86  groupby.GroupByMethods.time_method('int', 'cummax')
-        551±20μs          459±1μs     0.83  groupby.GroupByMethods.time_method('int', 'cummin')
-      1.17±0.1ms          475±7μs     0.40  groupby.GroupByMethods.time_method('float', 'sem')

@WillAyd WillAyd changed the title Removed if...else for K > 1 CLN: Removed Unnecessary Conditionals in groupby_helper.pxi.in Feb 17, 2018
@WillAyd WillAyd changed the title CLN: Removed Unnecessary Conditionals in groupby_helper.pxi.in CLN: Removed Unnecessary Conditionals in groupby_helper Feb 17, 2018
@WillAyd
Copy link
Member Author

WillAyd commented Feb 17, 2018

Same Travis failures we've been having recently - appear unrelated to change

@jreback jreback added this to the 0.23.0 milestone Feb 18, 2018
@jreback jreback merged commit c49cd54 into pandas-dev:master Feb 18, 2018
@jreback
Copy link
Contributor

jreback commented Feb 18, 2018

thanks @WillAyd even if this were slower it reduces code complexity which is good.

@WillAyd WillAyd deleted the grpby-helper-cln branch February 18, 2018 18:40
harisbal pushed a commit to harisbal/pandas that referenced this pull request Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code Clean Up - groupby_helper.pxi.in
2 participants