Slight performance overhead can be saved by using Random.nextDouble i…#457
Closed
bd2019us wants to merge 2 commits intoapache:trunkfrom
Closed
Slight performance overhead can be saved by using Random.nextDouble i…#457bd2019us wants to merge 2 commits intoapache:trunkfrom
bd2019us wants to merge 2 commits intoapache:trunkfrom
Conversation
added 2 commits
May 10, 2019 16:32
…nstead of Math.random for any instance of Math.random
Codecov Report
@@ Coverage Diff @@
## trunk #457 +/- ##
============================================
+ Coverage 61.19% 61.19% +<.01%
- Complexity 11462 11463 +1
============================================
Files 1220 1220
Lines 77974 77975 +1
Branches 7527 7527
============================================
+ Hits 47717 47719 +2
+ Misses 27556 27555 -1
Partials 2701 2701
Continue to review full report at Codecov.
|
Contributor
|
Thanks for your contribution. |
StorDm
pushed a commit
to etnetera/jmeter
that referenced
this pull request
Jan 7, 2021
…ocalRandom. Based on a patch by Xia Li. Closes apache#457 git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1859133 13f79535-47bb-0310-9956-ffa450edef68 Former-commit-id: da64e05
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.
…nstead of Math.random for any instance of Math.random.
Description
Though this is not the only instance of Math.random in the codebase, any instance of it can be replaced by Random.nextDouble. Though not performance critical, this can reduce performance overhead when done across all instances of Math.random.
I have a list of every applicable Math.random -> Random.nextDouble instance and will share such list if it is okay to move forward with such modifications.
Motivation and Context
Though not performance critical, this can reduce performance overhead when done across all instances of Math.random.
Types of changes
Checklist: