-
-
Notifications
You must be signed in to change notification settings - Fork 804
bench: refactor random number generation in stats/base/dists/weibull
#5011
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
Coverage Report
The above coverage report was generated for the changes in this PR. |
Can you please change the title to: bench: refactor random number generation in |
Also, I am not sure if you have the most recent changes in your current branch. Try to update your branch with the latest changes so you can also apply the required changes to all the |
lib/node_modules/@stdlib/stats/base/dists/weibull/cdf/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/weibull/cdf/benchmark/benchmark.js
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/weibull/cdf/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/weibull/cdf/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/weibull/cdf/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
stats/base/dists/weibull
stats/base/dists/weibull
Hey @anandkaranubc, Thank you for reviewing my PR. |
len = 100; | ||
|
||
x = new Float64Array( len ); |
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.
len = 100; | |
x = new Float64Array( len ); | |
len = 100; | |
x = new Float64Array( len ); |
No space between initializations
b.tic(); | ||
|
||
for ( i = 0; i < b.iterations; i++ ) { |
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.
b.tic(); | |
for ( i = 0; i < b.iterations; i++ ) { | |
b.tic(); | |
for ( i = 0; i < b.iterations; i++ ) { |
b.tic(); | ||
|
||
for ( i = 0; i < b.iterations; i++ ) { |
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.
b.tic(); | |
for ( i = 0; i < b.iterations; i++ ) { | |
b.tic(); | |
for ( i = 0; i < b.iterations; i++ ) { |
b.tic(); | ||
|
||
for ( i = 0; i < b.iterations; i++ ) { |
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.
b.tic(); | |
for ( i = 0; i < b.iterations; i++ ) { | |
b.tic(); | |
for ( i = 0; i < b.iterations; i++ ) { |
This change is required throughout the PR.
lambda = new Float64Array( len ); | ||
k = new Float64Array( len ); | ||
for ( i = 0; i < len; i++ ) { | ||
t[ i ] = uniform( EPS, 2.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.
t[ i ] = uniform( EPS, 2.0 ); | |
t[ i ] = uniform( EPS, 1.0 ); |
Make sure the minimum and maximum values in the uniform
expressions are no different than the original ones.
for ( i = 0; i < len; i++ ) { | ||
t[ i ] = uniform( EPS, 2.0 ); | ||
lambda[ i ] = uniform( EPS, 2.0 ); | ||
k[ i ] = uniform(1.0, 2.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.
k[ i ] = uniform(1.0, 2.0); | |
k[ i ] = uniform( 1.0, 2.0 ); |
This still needs to be addressed. |
Ref: #5342 |
Thank you for working on this pull request. However, we cannot accept your contribution as the issue this pull request seeks to resolve has already been addressed in a different pull request or commit. Thank you again for your interest in stdlib, and we look forward to reviewing your future contributions. |
Resolves #4992
Description
This pull request:
stats/base/dists/weibull
#4992Related Issues
This pull request:
stats/base/dists/weibull
#4992 [RFC]: Refactor random number generation in JS benchmarks forstats/base/dists
(tracking issue) #4993Questions
What about the benchmark of ctor? Do we need to change that too?
Other
No.
Checklist
@stdlib-js/reviewers