You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A few of the methods in groupby_helper.pxi.in have a pattern that goes:
N, K= (<object>values).shapewithnogil:
ifK>1:
# loop over j in range(K) and do stuff
...
else:
# do stuff with j=0
...
Unless I'm missing something simple I don't think there's a reason to have the conditional and duplicate code branches. In the case where K=1 (which is all the time?) then the for j in range(K) construct inherently sets j=0, bypassing the need for the conditional
The text was updated successfully, but these errors were encountered:
I believe the K > 1 would get used sometime, from what I remember some of the aggregations are done by-block, which means a 2d array of multiple columns could get passed down.
It's probably a micro-micro optimization, but having it split like this may generate slightly better code for K=1 case. But welcome you to benchmark and if it doesn't matter, clean it up.
A few of the methods in
groupby_helper.pxi.in
have a pattern that goes:Unless I'm missing something simple I don't think there's a reason to have the conditional and duplicate code branches. In the case where K=1 (which is all the time?) then the
for j in range(K)
construct inherently setsj=0
, bypassing the need for the conditionalThe text was updated successfully, but these errors were encountered: