Skip to content
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

PERF: fix clean_index_list perf #16295

Merged
merged 1 commit into from
May 9, 2017
Merged

Conversation

jreback
Copy link
Contributor

@jreback jreback commented May 9, 2017

closes #16285

In [1]: np.random.seed(1234)

In [2]: import pandas as pd
   ...: from numpy import random
   ...: dct = dict(zip(range(1000), random.randint(1000, size=1000)))
   ...: keys = random.randint(1000, size=1000000).tolist()
   ...: %timeit [dct[k] for k in keys]
   ...: sdct = pd.Series(dct)
   ...: %timeit sdct[keys]

0.19.2

76.7 ms ± 1.12 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
568 ms ± 5.07 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

0.20.1

85.9 ms ± 2.58 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
691 ms ± 20.4 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

0.20.2

90.5 ms ± 1.09 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
282 ms ± 5.11 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

@jreback jreback added Indexing Related to indexing on series/frames, not to indexes themselves Performance Memory or execution speed performance labels May 9, 2017
@jreback jreback added this to the 0.20.2 milestone May 9, 2017
@codecov
Copy link

codecov bot commented May 9, 2017

Codecov Report

Merging #16295 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16295      +/-   ##
==========================================
- Coverage   90.39%   90.37%   -0.02%     
==========================================
  Files         161      161              
  Lines       50863    50863              
==========================================
- Hits        45977    45969       -8     
- Misses       4886     4894       +8
Flag Coverage Δ
#multiple 88.16% <ø> (ø) ⬆️
#single 40.33% <ø> (-0.1%) ⬇️
Impacted Files Coverage Δ
pandas/core/indexes/base.py 95.75% <ø> (ø) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.59% <0%> (-0.1%) ⬇️
pandas/io/clipboard/clipboard.py
pandas/io/clipboards.py 100% <0%> (ø)
pandas/core/common.py 91.03% <0%> (+0.34%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bed864...b8fb546. Read the comment docs.

@codecov
Copy link

codecov bot commented May 9, 2017

Codecov Report

Merging #16295 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16295      +/-   ##
==========================================
- Coverage   90.39%   90.37%   -0.02%     
==========================================
  Files         161      161              
  Lines       50863    50863              
==========================================
- Hits        45977    45969       -8     
- Misses       4886     4894       +8
Flag Coverage Δ
#multiple 88.16% <ø> (ø) ⬆️
#single 40.33% <ø> (-0.1%) ⬇️
Impacted Files Coverage Δ
pandas/core/indexes/base.py 95.75% <ø> (ø) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.59% <0%> (-0.1%) ⬇️
pandas/io/clipboard/clipboard.py
pandas/io/clipboards.py 100% <0%> (ø)
pandas/core/common.py 91.03% <0%> (+0.34%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bed864...b8fb546. Read the comment docs.

@jreback jreback merged commit ce4eef3 into pandas-dev:master May 9, 2017
pawroman pushed a commit to pawroman/pandas that referenced this pull request May 9, 2017
pcluo pushed a commit to pcluo/pandas that referenced this pull request May 22, 2017
TomAugspurger pushed a commit to TomAugspurger/pandas that referenced this pull request May 29, 2017
TomAugspurger pushed a commit that referenced this pull request May 30, 2017
closes #16285
(cherry picked from commit ce4eef3)
stangirala pushed a commit to stangirala/pandas that referenced this pull request Jun 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indexing Related to indexing on series/frames, not to indexes themselves Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

performance of Series label-indexing with a list of labels
2 participants