bench: bound seed growth in random/base/* factory benchmarks - #15130
bench: bound seed growth in random/base/* factory benchmarks#15130Planeshifter wants to merge 1 commit into
random/base/* factory benchmarks#15130Conversation
Propagates fix from 448b573 ("bench: bound seed growth in `factory` benchmark") to sibling packages with the same unbounded seed accumulation in the `factory:seed=<integer>` benchmark. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011cVRuut4rg5J1R4WoiJgyP
Coverage Report
The above coverage report was generated for the changes in this PR. |
|
The Mechanism: Proposed patch for the runner script (out of scope for this propagation PR, so not included in the diff): # .github/workflows/scripts/run_affected_tests/run
printf '%s\n' ${files} | xargs -s 100000 sh -c 'make test-javascript-files-min FILES="$*"' _Bounding the total command line to ~100 KB keeps each Generated by Claude Code |
Description
This pull request:
developin 448b573 to sibling packages.This applies the same one-line fix already merged in
448b573to the 38random/base/*packages whosefactorybenchmark shares the identicalopts.seed += i;accumulation. Left unbounded, the seed grows quadratically and overtakes mt19937'sUINT32_MAXceiling once the benchmark harness auto-scales past roughly 92k iterations, throwing aRangeErrorand failing the benchmark. Each fix mirrors the bounded form already used in that same file's array-seed benchmark (opts.seed[ 0 ] = i + 1;), matching whatminstd,minstd-shuffle, andmt19937already do.Source commit: 448b573 ("bench: bound seed growth in
factorybenchmark"). Targets: all 38 packages underrandom/base/*with afactorybenchmark carrying the accumulating form (arcsine,bernoulli,beta,betaprime,binomial,box-muller,cauchy,chi,chisquare,cosine,discrete-uniform,erlang,exponential,f,frechet,gamma,geometric,gumbel,hypergeometric,improved-ziggurat,invgamma,kumaraswamy,laplace,levy,logistic,lognormal,negative-binomial,normal,pareto-type1,poisson,randi,randn,randu,rayleigh,t,triangular,uniform,weibull).Related Issues
No related issues.
Questions
No.
Other
Validation performed before applying the change:
lib/node_modules/@stdlib/random/**(the accumulating form occurs nowhere else in the repository);minstd,minstd-shuffle, andmt19937already use the bounded form.seedoption to the mt19937 factory's positive-integer/UINT32_MAXvalidation (directly, or viagamma/chisquare/poisson/improved-ziggurat/box-mullerchains).Booleanwrapper inlib/native.js) — all other textual matches wrap addons which return int32/uint32 values, where the wrapper is load-bearing, so no sites were propagated.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code as part of an automated fix-propagation routine; each target site was independently validated twice before the change was applied.
@stdlib-js/reviewers
🤖 Generated with Claude Code
https://claude.ai/code/session_011cVRuut4rg5J1R4WoiJgyP
Generated by Claude Code