Skip to content

Conversation

@AryanJ18
Copy link
Contributor

@AryanJ18 AryanJ18 commented Jan 6, 2026

bench:refactor random number generation in stats/base/dists/signrank issue: #4986

Resolves #4986 .

Description

What is the purpose of this pull request?

This pull request:

This pull request improves random number generation in JS benchmarks for stats/base/dists/signrank. Specifically:
Moves random number generation out of benchmarking loops to prevent interference with benchmark results.
Uses @stdlib/random/base/uniform and @stdlib/random/base/discrete-uniform instead of randu expressions.
Ensures generated random values maintain the same range as existing values for consistency.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

References #4837 and #4955 as examples of similar improvements.

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

{{TODO: add disclosure if applicable}}


@stdlib-js/reviewers

bench:refactor random number generation in stats/base/dists/signrank
issue: stdlib-js#4986
@stdlib-bot stdlib-bot added Good First PR A pull request resolving a Good First Issue. Statistics Issue or pull request related to statistical functionality. Needs Review A pull request which needs code review. and removed Good First PR A pull request resolving a Good First Issue. labels Jan 6, 2026
@stdlib-bot
Copy link
Contributor

stdlib-bot commented Jan 6, 2026

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/signrank/cdf $\color{red}309/311$
$\color{green}+0.00%$
$\color{red}36/37$
$\color{green}+0.00%$
$\color{green}4/4$
$\color{green}+0.00%$
$\color{red}309/311$
$\color{green}+0.00%$
stats/base/dists/signrank/quantile $\color{green}305/305$
$\color{green}+0.00%$
$\color{green}45/45$
$\color{green}+0.00%$
$\color{green}4/4$
$\color{green}+0.00%$
$\color{green}305/305$
$\color{green}+0.00%$

The above coverage report was generated for the changes in this PR.

bench: refactor random number generation in stats/base/dists/signrank
issue: stdlib-js#4986
@AryanJ18 AryanJ18 changed the title bench:refactor random number generation in stats/base/dists/signrank bench: refactor random number generation in stats/base/dists/signrank Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good First PR A pull request resolving a Good First Issue. Needs Review A pull request which needs code review. Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC]: Refactor random number generation in JS benchmarks for stats/base/dists/signrank

2 participants