Repository navigation
Speed up time calculations a tiny bit using faster test. - #8355
Merged
Merged
Conversation
Contributor
|
Using |
mhvk
force-pushed
the
time-small-speedup
branch
from
January 16, 2019 13:42
1b6f706 to
c6c074a
Compare
Codecov Report
@@ Coverage Diff @@
## master #8355 +/- ##
==========================================
- Coverage 86.75% 86.74% -0.01%
==========================================
Files 387 387
Lines 58108 58112 +4
Branches 1060 1060
==========================================
+ Hits 50409 50412 +3
- Misses 7084 7085 +1
Partials 615 615
Continue to review full report at Codecov.
|
mhvk
force-pushed
the
time-small-speedup
branch
from
January 16, 2019 13:44
c6c074a to
94a4427
Compare
Member
|
@taldcroft , do you want to have a look as a co-maintainer before merge? 😄 |
mhvk
force-pushed
the
time-small-speedup
branch
from
January 23, 2019 14:26
94a4427 to
6760ad4
Compare
bsipocz
approved these changes
Jan 25, 2019
Member
|
While this has been only approved my non subpackage maintainers I'm going ahead a merge it to get it off the plate. |
Member
|
Thanks @mhvk! |
bsipocz
added a commit
that referenced
this pull request
Jan 30, 2019
Speed up time calculations a tiny bit using faster test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was alerted to this by getting annoying deprecationwarnings arising from
np.any(factor != 1)withfactora quantity. Really, the test should just short-cut only when one passes in exactly unity, and execute otherwise; insidetime, the most frequent call is without a factor or divisor, so good to skip those as fast as possible.EDIT: this relies on
This works for int, not float.