Skip to content

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

Merged
merged 3 commits into from
May 1, 2020
Merged

CLN: address TODOs #33886

merged 3 commits into from
May 1, 2020

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

@@ -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):
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Member Author

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"

Copy link
Contributor

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

Copy link
Member Author

@jbrockmendel jbrockmendel May 1, 2020

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

Copy link
Member

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

Copy link
Member Author

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?

Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

raised issue in #33926

Copy link
Contributor

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.

@jreback jreback added the Clean label Apr 30, 2020
@jreback jreback added this to the 1.1 milestone Apr 30, 2020
@WillAyd WillAyd mentioned this pull request May 1, 2020
@jreback jreback merged commit b62a3a4 into pandas-dev:master May 1, 2020
@jbrockmendel jbrockmendel deleted the cln-todo branch May 1, 2020 20:17
rhshadrach pushed a commit to rhshadrach/pandas that referenced this pull request May 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants