-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
PERF: improve perf of index iteration (GH7683) #7720
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
Conversation
if box and util.is_string_object(offset): | ||
from pandas.tseries.frequencies import to_offset | ||
offset = to_offset(offset) | ||
|
||
if tz is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a lot dup codes under this if/else clause. combine them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are not completely dupes
this is how cython goes though
u could right an inline function to do it
why don't u give a try!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you make such a good case. ok then!
though i don't know how this work. how can i pull this change and continue to work on it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like this:
git checkout -b jreback-iter origin/master
git pull https://github.com/jreback/pandas.git iter
Then you will have a local branch jreback-iter
where you can make changes and such
then you can push up this branch; it will be local to you. just ping and i'll pick-up your commits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used a func pointer.
https://github.com/yrlihuan/pandas/commits/jreback-iter
5 times faster! that's great! |
PERF: DatetimeIndex.__iter__ now uses ints_to_pydatetime with boxing tslib: remove code dup in ints_to_pydatetime PERF: add inline to create_timestamp_from_*
PERF: improve perf of index iteration (GH7683)
@yrlihuan thanks for the fixes on this! |
closes #7683
PeriodIndex
creation is still in python space, not much help