-
-
Notifications
You must be signed in to change notification settings - Fork 822
Resolves #4982 by improving benchmark accuracy and performance. #5124
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
Conversation
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
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.
👋 Hi there! 👋
And thank you for opening your first pull request! We will review it shortly. 🏃 💨
Coverage Report
The above coverage report was generated for the changes in this PR. |
@anandkaranubc |
var alpha = uniform( EPS, 100.0 ); | ||
var beta = uniform( EPS, 100.0 ); |
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.
var alpha = uniform( EPS, 100.0 ); | |
var beta = uniform( EPS, 100.0 ); | |
var alpha; | |
var beta; |
Variable declarations happen at the top and separately from their initializations.
} | ||
} | ||
for ( i = 0; i < b.iterations; i++ ) { | ||
x = uniform( EPS, 20.0 ); |
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.
The use of uniform
should be moved out of the benchmarking loop so it doesn't interfere with the benchmark results.
var beta = 55.54321; | ||
var mycdf = cdf.factory( alpha, beta ); |
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.
Same comment as above.
Hii @Mohammad-Tamerr, I just had a look. I suggest reviewing the reference PR first to get a clearer understanding of how to approach this issue. There are some major changes that need to be made. |
Additionally, please make sure you have followed the development guide and setup EditorConfig. Your indentation is off for various files. |
Thank you for working on this pull request. However, we cannot accept your contribution as this pull request does not follow project conventions. We place a high value on consistency throughout the stdlib codebase, and this pull request was found to significantly deviate from stdlib conventions. We encourage you to closely examine other packages in stdlib and attempt to emulate the practices and conventions found therein.
In short, the more effort you put in to ensure that your contribution looks and feels like stdlib—including variables names, bracket spacing, line breaks, etc—the more likely that your contribution will be reviewed and ultimately accepted. We encourage you to closely study the codebase before continuing to work on this pull request. Thank you again for your interest in stdlib, and we look forward to reviewing your future contributions. |
Refactor Benchmarking for Pareto Type I Distribution
Description
This PR refactors the benchmarking code for the
stats/base/dists/pareto-type1
module to improve accuracy and performance measurements.Changes:
randu()
withuniform()
for more precise random number generation.uniform()
is correctly imported from@stdlib/random/base/uniform
.Issue
Fix #4988.
Testing
Checklist