Skip to content

PERF: construction with integer dtype #50306

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 2 commits into from
Dec 17, 2022
Merged

Conversation

jbrockmendel
Copy link
Member

Motivated by this arithmetic example:

In [2]: ser = pd.Series(range(10_000_000))

In [3]: %timeit ser + 1
23.3 ms ± 304 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)  # <- main
15.1 ms ± 110 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)  # <- PR

Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

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

mypy complains.

So copy wasn't used anyway?

@jbrockmendel
Copy link
Member Author

mypy complains.

fixed

So copy wasn't used anyway?

correct

@phofl phofl added this to the 2.0 milestone Dec 17, 2022
@phofl phofl added Performance Memory or execution speed performance Numeric Operations Arithmetic, Comparison, and Logical operations labels Dec 17, 2022
@phofl phofl merged commit 1262471 into pandas-dev:main Dec 17, 2022
@phofl
Copy link
Member

phofl commented Dec 17, 2022

thx @jbrockmendel

@jbrockmendel jbrockmendel deleted the perf branch December 17, 2022 18:50
phofl pushed a commit to phofl/pandas that referenced this pull request Dec 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Numeric Operations Arithmetic, Comparison, and Logical operations Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants