Skip to content

Conversation

lukemanley
Copy link
Member

Improves perf for MultiIndex.isin.

       before           after         ratio
     [d47e0523]       [edd67b0a]
     <main>           <mi-isin> 
-     7.98±0.06ms      6.06±0.07ms     0.76  multiindex_object.Isin.time_isin_small('string')
-     5.70±0.07ms      4.02±0.03ms     0.71  multiindex_object.Isin.time_isin_small('int')
-     6.18±0.09ms      4.31±0.03ms     0.70  multiindex_object.Isin.time_isin_small('datetime')
-      42.7±0.5ms       6.73±0.2ms     0.16  multiindex_object.Isin.time_isin_large('string')
-      41.7±0.8ms       4.86±0.1ms     0.12  multiindex_object.Isin.time_isin_large('int')
-         136±2ms      4.87±0.07ms     0.04  multiindex_object.Isin.time_isin_large('datetime')

@lukemanley lukemanley added Performance Memory or execution speed performance MultiIndex labels Nov 8, 2022
@mroeschke mroeschke added this to the 2.0 milestone Nov 8, 2022
@mroeschke mroeschke merged commit 49a03f4 into pandas-dev:main Nov 8, 2022
@mroeschke
Copy link
Member

Nice find! Thanks @lukemanley

phofl pushed a commit to phofl/pandas that referenced this pull request Nov 9, 2022
* MultiIndex.isin perf

* gh ref
@lukemanley lukemanley deleted the mi-isin branch November 10, 2022 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MultiIndex Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants