Skip to content

bench: update random value generation#9923

Merged
kgryte merged 1 commit intostdlib-js:developfrom
hrshya:bench/studentized-range
Jan 28, 2026
Merged

bench: update random value generation#9923
kgryte merged 1 commit intostdlib-js:developfrom
hrshya:bench/studentized-range

Conversation

@hrshya
Copy link
Contributor

@hrshya hrshya commented Jan 27, 2026

Resolves none .

Description

What is the purpose of this pull request?

This pull request:

  • Refactors random number generation in JS benchmarks for the stats/base/dists/studentized-range/* packages.
  • Replaces uniform() from @stdlib/random/array/uniform for cleaner and more consistent code.
  • Moves the random number generation outside the benchmarking loops.
  • Refactors to use string interpolation.

Related Issues

Does this pull request have any related issues?

This pull request:

  • resolves no related issues.

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.


@stdlib-js/reviewers

@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Needs Review A pull request which needs code review. labels Jan 27, 2026
@hrshya hrshya added difficulty: 1 Low degree of difficulty. Should be straightforward to implement and/or resolve. Benchmarks Pull requests adding or improving benchmarks for measuring performance. review: 4 labels Jan 27, 2026
@stdlib-bot
Copy link
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/studentized-range/cdf $\color{red}649/709$
$\color{green}+91.54%$
$\color{red}68/85$
$\color{green}+80.00%$
$\color{green}9/9$
$\color{green}+100.00%$
$\color{red}649/709$
$\color{green}+91.54%$
stats/base/dists/studentized-range/quantile $\color{red}539/569$
$\color{green}+94.73%$
$\color{red}66/81$
$\color{green}+81.48%$
$\color{green}5/5$
$\color{green}+100.00%$
$\color{red}539/569$
$\color{green}+94.73%$

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

@Planeshifter Planeshifter added the Ready To Merge A pull request which is ready to be merged. label Jan 27, 2026
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Jan 27, 2026
@stdlib-bot
Copy link
Contributor

PR Commit Message

bench: update random value generation

PR-URL: https://github.com/stdlib-js/stdlib/pull/9923

Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>

Please review the above commit message and make any necessary adjustments.

@Planeshifter
Copy link
Member

@kgryte This PR changes the benchmark string from :factory to ::factory. This seems correct given the latest discussion we had, since we are not measuring the performance of .factory, but the generated function. However, this does imply that we should update all benchmarks in stats where we have benchmarks with factory methods to use ::factory instead of :factory, as we to my knowledge never test the performance of the factory methods themselves.

@kgryte
Copy link
Member

kgryte commented Jan 27, 2026

@Planeshifter Agreed.

@kgryte kgryte merged commit 5ff8286 into stdlib-js:develop Jan 28, 2026
134 checks passed
@stdlib-bot stdlib-bot removed the Ready To Merge A pull request which is ready to be merged. label Jan 28, 2026
@hrshya hrshya deleted the bench/studentized-range branch January 28, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Benchmarks Pull requests adding or improving benchmarks for measuring performance. difficulty: 1 Low degree of difficulty. Should be straightforward to implement and/or resolve. review: 5 Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants