-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: address TODOs #33886
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
CLN: address TODOs #33886
Conversation
pandas/_libs/lib.pyx
Outdated
@@ -221,7 +221,7 @@ def is_iterator(obj: object) -> bool: | |||
return PyIter_Check(obj) | |||
|
|||
|
|||
def item_from_zerodim(val: object) -> object: | |||
cpdef object item_from_zerodim(object val): |
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.
can you add inline here?
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.
could i guess, i dont think it makes a difference
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.
on balance i prefer not to mix "inline" with "cpdef"
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.
right that’s the question does this make a perf difference? as u have it vs master
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.
huh, if anything map_infer is somewhat slower in this PR than in master, and its worse with inline
. so im going to revert this edit, remove the TODO comments, and in a separate branch look into if we can improve item_from_zerodim
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.
I can open an issue about this separately, but our current inline strategy may be doing more harm than good. GCC has a -Winline
flag that will tell you when a function declared with inline isn't actually inlined, and running this on Linux appears to produce 11 MB worth of warnings with a clean build of pandas
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.
Yikes. Addressing the larger issue separately makes sense. For the purposes of this PR, is there something that should be changed?
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.
Things lgtm here as is, but let's see what Jeff thinks
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.
raised issue in #33926
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.
no this is fine, but yeah looking at this generally is prob a good idea.
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff