-
-
Notifications
You must be signed in to change notification settings - Fork 913
bench: refactor random number generation in JS benchmarks for stats/b… #5162
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
bench: refactor random number generation in JS benchmarks for stats/b… #5162
Conversation
…ase/dists/pareto-type1
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown
status: na
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: na
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: na
- task: lint_javascript_benchmarks
status: passed
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: na
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
---
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
---
Coverage Report
The above coverage report was generated for the changes in this PR. |
|
@Planeshifter ready for review |
lib/node_modules/@stdlib/stats/base/dists/pareto-type1/cdf/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/pareto-type1/ctor/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/pareto-type1/ctor/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/pareto-type1/ctor/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/pareto-type1/mode/benchmark/benchmark.js
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/pareto-type1/skewness/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/pareto-type1/stdev/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
|
Great work, @yaswanthkosuru. Just some minor changes, otherwise the PR looks good! |
…stats/base/dists/pareto-type1
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown
status: na
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: na
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: na
- task: lint_javascript_benchmarks
status: passed
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: na
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
---
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: passed
- task: run_julia_benchmarks
status: na
- task: run_python_benchmarks
status: na
- task: run_r_benchmarks
status: na
- task: run_javascript_tests
status: na
---
|
@anandkaranubc addressed all changes can you please review.hoping no changes required more. |
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.
There still are some changes that are yet to be made based on the review.
lib/node_modules/@stdlib/stats/base/dists/pareto-type1/stdev/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/pareto-type1/skewness/benchmark/benchmark.native.js
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/pareto-type1/skewness/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
Yes, you can call the bot for lint fixes, but relying on it isn't a good practice. |
Signed-off-by: yaswanth <[email protected]>
| alpha = 100.56789; | ||
| beta = 55.54321; | ||
| dist = new Pareto1( alpha, beta ); | ||
| len=100; |
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; | |
| len = 100; |
| len = 100; | ||
| x = new Float64Array( len ); | ||
| for ( i = 0; i < len; i++ ) { | ||
| x[ i ] = 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.
Is EPS needed here?
| len = 100; | ||
| x = new Float64Array( len ); | ||
| for ( i = 0; i < len; i++ ) { | ||
| x[ i ] = 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.
| x[ i ] = uniform( EPS, 100.0 ); | |
| x[ i ] = uniform( 0.0, 100.0 ); |
Same comment as above. If EPS is necessary here, it's fine to keep it. Otherwise, the range should remain the same as original.
|
|
||
| alpha = 100.56789; | ||
| beta = 55.54321; | ||
| len=100; |
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; | |
| len = 100; |
| for ( i = 0; i < b.iterations; i++ ) { | ||
| x = ( randu()*50.0 ) + EPS; | ||
| y = mylogcdf( x ); | ||
| y = mylogcdf( x[ i % 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.
| y = mylogcdf( x[ i % len] ); | |
| y = mylogcdf( x[ i % len ] ); |
| alpha = 100.56789; | ||
| beta = 55.54321; | ||
| len=100; | ||
| x = new Float64Array( len ); | ||
| for ( i = 0; i < len; i++ ) { | ||
| x[ i ] = uniform( EPS, 50.0 ); | ||
| } | ||
| mypdf = pdf.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.
| alpha = 100.56789; | |
| beta = 55.54321; | |
| len=100; | |
| x = new Float64Array( len ); | |
| for ( i = 0; i < len; i++ ) { | |
| x[ i ] = uniform( EPS, 50.0 ); | |
| } | |
| mypdf = pdf.factory( alpha, beta ); | |
| alpha = 100.56789; | |
| beta = 55.54321; | |
| mypdf = pdf.factory( alpha, beta ); | |
| len = 100; | |
| x = new Float64Array( len ); | |
| for ( i = 0; i < len; i++ ) { | |
| x[ i ] = uniform( EPS, 50.0 ); | |
| } |
| } | ||
| b.tic(); |
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(); | |
| } | |
| b.tic(); |
|
Thank you for working on this pull request. However, we cannot accept your contribution due to Git history issues. Some common issues include:
We recommend opening a new pull request with only the intended changes. Thank you for your interest in stdlib, and we look forward to your future contributions. |
Resolves #4982.
Description
This pull request:
Related Issues
This pull request:
stats/base/dists/pareto-type1#4982Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers