bench: refactor random number generation in stats/base/dists/studentized-range#5175
Conversation
---
type: pre_push_report
description: Results of running various checks prior to pushing changes.
report:
- task: run_javascript_examples
status: na
- task: run_c_examples
status: na
- task: run_cpp_examples
status: na
- task: run_javascript_readme_examples
status: na
- task: run_c_benchmarks
status: na
- task: run_cpp_benchmarks
status: na
- task: run_fortran_benchmarks
status: na
- task: run_javascript_benchmarks
status: na
- task: run_julia_benchmarks
status: na
- task: run_python_benchmarks
status: na
- task: run_r_benchmarks
status: na
- task: run_javascript_tests
status: na
---
stdlib-bot
left a comment
There was a problem hiding this comment.
👋 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. |
| q = uniform( 0.0, 12.0 ); | ||
| r = uniform( 2.0, 20.0 ); | ||
| v = uniform( 2.0, 20.0 ); |
There was a problem hiding this comment.
Here, q, r, and v should each be a Float64Array of length 100 and should be initialized in a loop. Reference PRs will help.
| q = uniform( 0.0, 12.0 ); | ||
| r = uniform( 2.0, 20.0 ); | ||
| v = uniform( 2.0, 20.0 ); | ||
| y = cdf( q, r, v ); |
There was a problem hiding this comment.
This should still remain in the benchmarking loop, as it is the part being benchmarked.
| q = uniform( 0.0, 1.0 ); | ||
| y = mycdf( q ); |
There was a problem hiding this comment.
Same comment as above and applies throughout the PR.
There was a problem hiding this comment.
Yes, considering you are using the correct range for random number generation.
---
type: pre_push_report
description: Results of running various checks prior to pushing changes.
report:
- task: run_javascript_examples
status: na
- task: run_c_examples
status: na
- task: run_cpp_examples
status: na
- task: run_javascript_readme_examples
status: na
- task: run_c_benchmarks
status: na
- task: run_cpp_benchmarks
status: na
- task: run_fortran_benchmarks
status: na
- task: run_javascript_benchmarks
status: na
- task: run_julia_benchmarks
status: na
- task: run_python_benchmarks
status: na
- task: run_r_benchmarks
status: na
- task: run_javascript_tests
status: na
---
|
I have made the changes. Can you please review it. |
| p[i] = uniform( 0.0, 1.0 ); | ||
| r[i] = uniform( 2.0, 20.0 ); | ||
| v[i] = uniform( 2.0, 20.0 ); |
There was a problem hiding this comment.
Same comment as above, and applies throughout the PR
…f/benchmark/benchmark.js Co-authored-by: Karan Anand <119553199+anandkaranubc@users.noreply.github.com> Signed-off-by: Harsh <149176984+hrshya@users.noreply.github.com>
…f/benchmark/benchmark.js Co-authored-by: Karan Anand <119553199+anandkaranubc@users.noreply.github.com> Signed-off-by: Harsh <149176984+hrshya@users.noreply.github.com>
…f/benchmark/benchmark.js Co-authored-by: Karan Anand <119553199+anandkaranubc@users.noreply.github.com> Signed-off-by: Harsh <149176984+hrshya@users.noreply.github.com>
…antile/benchmark/benchmark.js Co-authored-by: Karan Anand <119553199+anandkaranubc@users.noreply.github.com> Signed-off-by: Harsh <149176984+hrshya@users.noreply.github.com>
Signed-off-by: Harsh <149176984+hrshya@users.noreply.github.com>
…antile/benchmark/benchmark.js Co-authored-by: Karan Anand <119553199+anandkaranubc@users.noreply.github.com> Signed-off-by: Harsh <149176984+hrshya@users.noreply.github.com>
…antile/benchmark/benchmark.js Co-authored-by: Karan Anand <119553199+anandkaranubc@users.noreply.github.com> Signed-off-by: Harsh <149176984+hrshya@users.noreply.github.com>
|
Hi @anandkaranubc , Can you pls review it. |
On it! |
|
/stdlib lint-autofix |
anandkaranubc
left a comment
There was a problem hiding this comment.
Just some minor changes. Rest, the PR looks good!
| var isnan = require( '@stdlib/math/base/assert/is-nan' ); | ||
| var pkg = require( './../package.json' ).name; | ||
| var quantile = require( './../lib' ); | ||
| var uniform = require('@stdlib/random/base/uniform'); | ||
| var Float64Array = require( '@stdlib/array/float64' ); |
There was a problem hiding this comment.
| var isnan = require( '@stdlib/math/base/assert/is-nan' ); | |
| var pkg = require( './../package.json' ).name; | |
| var quantile = require( './../lib' ); | |
| var uniform = require('@stdlib/random/base/uniform'); | |
| var Float64Array = require( '@stdlib/array/float64' ); | |
| var isnan = require( '@stdlib/math/base/assert/is-nan' ); | |
| var uniform = require( '@stdlib/random/base/uniform' ); | |
| var Float64Array = require( '@stdlib/array/float64' ); | |
| var pkg = require( './../package.json' ).name; | |
| var quantile = require( './../lib' ); |
Just some rearrangement for consistency.
…f/benchmark/benchmark.js Co-authored-by: Karan Anand <119553199+anandkaranubc@users.noreply.github.com> Signed-off-by: Harsh <149176984+hrshya@users.noreply.github.com>
…antile/benchmark/benchmark.js Co-authored-by: Karan Anand <119553199+anandkaranubc@users.noreply.github.com> Signed-off-by: Harsh <149176984+hrshya@users.noreply.github.com>
|
/stdlib lint-autofix |
|
@hrshya Can you also change the title to: bench: refactor random number generation in Make sure you apply backticks around stats/base/dists/studentized-range |
stats/base/dists/studentized-range
|
@anandkaranubc Done! |
anandkaranubc
left a comment
There was a problem hiding this comment.
Great work! Time to wait for a maintainer to merge this PR :)
PR Commit MessagePlease review the above commit message and make any necessary adjustments. |
|
Thanks @hrshya for PR and @anandkaranubc for review; much appreciated! |

type: pre_push_report
description: Results of running various checks prior to pushing changes. report:
Resolves #4987
Description
This pull request:
stats/base/dists/studentized-range#4987Related Issues
This pull request:
stats/base/dists/beta#4837 bench: refactor random number generation instats/base/dists/hypergeometric#4955Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers