Skip to content

Conversation

@jbrockmendel
Copy link
Member

for py37 this uses -X importtime to get a more precise number without subprocess overhead. Doesn't actually do anything with it, but what the heck.

Couple of unrelated cleanups.

@simonjayhawkins simonjayhawkins added the Benchmark Performance (ASV) benchmarks label Aug 31, 2019
@jreback jreback added this to the 1.0 milestone Sep 2, 2019
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

very minor comment, merge on green.

def time_import(self):
if PY37:
cmd = [sys.executable, "-X", "importtime", "-c", "import pandas as pd"]
p = subprocess.run(cmd, stderr=subprocess.PIPE)
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 a comment for this as 3.7 actually does the timing, where for < 3.7 asv is doing the timing.

Copy link
Member Author

Choose a reason for hiding this comment

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

comment added + green

return total

cmd = [sys.executable, "-c", "import pandas as pd"]
p = subprocess.run(cmd, stderr=subprocess.PIPE)
Copy link
Contributor

Choose a reason for hiding this comment

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

is this a lint error to assign to p?

Copy link
Member Author

Choose a reason for hiding this comment

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

i think it should be, no idea why it isn't. will fix anyway

@WillAyd WillAyd merged commit 6a7ba96 into pandas-dev:master Sep 5, 2019
@WillAyd
Copy link
Member

WillAyd commented Sep 5, 2019

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the impspeed branch September 5, 2019 15:45
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Benchmark Performance (ASV) benchmarks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PERF: asv for import time

5 participants