-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
PERF: Improve replace perf #12745
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: Improve replace perf #12745
Conversation
notice that |
48637d9
to
31ae2e3
Compare
Ah, found some |
@@ -0,0 +1,276 @@ | |||
# coding=utf-8 | |||
# pylint: disable-msg=E1101,W0612 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great!
dcf2ace
to
904d4e1
Compare
Current coverage is 85.27% (diff: 90.00%)@@ master #12745 diff @@
==========================================
Files 144 144
Lines 50915 50921 +6
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 43419 43423 +4
- Misses 7496 7498 +2
Partials 0 0
|
can you rebase / update? |
db1e776
to
e16a99f
Compare
lgtm. can we merge this independent of the other PR's? (so it could go in 0.19.2) |
e16a99f
to
ffc59b0
Compare
It is independent. #12780 fixes some existing bugs separately. |
thanks! |
When .replace is called with `dict`, replacements are done per value. Current impl try to soft convert the dtype in every replacement, but it is enough to be done in the final replacement. Author: sinhrks <[email protected]> Closes #12745 from sinhrks/replace_perf and squashes the following commits: ffc59b0 [sinhrks] PERF: Improve replace perf (cherry picked from commit e299560)
git diff upstream/master | flake8 --diff
When
.replace
is called withdict
, replacements are done per value. Current impl try to soft convert the dtype in every replacement, but it is enough to be done in the final replacement.Bench