Skip to content

Commit 70e9e72

Browse files
author
ReviewLoop
committed
fix: address review feedback for PR #184
1 parent bbbd8dc commit 70e9e72

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

‎benchmarks/benchmarks/bench_continuous.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,14 @@
4040
"normal": ("normal", (1.0, 2.0)),
4141
"standard_exponential": ("standard_exponential", ()),
4242
"exponential": ("exponential", (2.0,)),
43-
# MKL's GNORM gamma method switches algorithm at shape 1 and at 0.6
43+
# MKL's GNORM gamma method may select different internal algorithms
44+
# around shape 1 and 0.6; these shapes exercise those regimes
4445
"standard_gamma": ("standard_gamma", (3.0,)),
4546
"standard_gamma_mid_shape": ("standard_gamma", (0.8,)),
4647
"standard_gamma_small_shape": ("standard_gamma", (0.5,)),
47-
# MKL's CJA beta method uses Cheng, Johnk or Atkinson depending on shapes
48+
# MKL's CJA beta method may select different internal algorithms (Cheng,
49+
# Johnk or Atkinson) depending on shapes; these shapes exercise those
50+
# regimes
4851
"beta": ("beta", (2.0, 5.0)),
4952
"beta_small_shape": ("beta", (0.5, 0.5)),
5053
"beta_mixed_shape": ("beta", (0.5, 2.0)),

‎benchmarks/benchmarks/bench_discrete.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@
3434

3535
# name -> (MKLRandomState method, positional arguments before ``size``)
3636
_DISCRETE = {
37-
# MKL's BTPE binomial method uses acceptance/rejection only when
38-
# n * min(p, 1 - p) >= 30
37+
# MKL's BTPE binomial method may select a different internal algorithm
38+
# when n * min(p, 1 - p) >= 30; these parameters exercise both regimes
3939
"binomial": ("binomial", (10, 0.5)),
4040
"binomial_large_n": ("binomial", (1000, 0.3)),
4141
"negative_binomial": ("negative_binomial", (5, 0.5)),
4242
# default method (POISNORM); per-method timings are in bench_methods.py
4343
"poisson": ("poisson", (10.0,)),
4444
"geometric": ("geometric", (0.3,)),
45-
# MKL's H2PE hypergeometric method uses acceptance/rejection for a large
46-
# mode
45+
# MKL's H2PE hypergeometric method may select a different internal
46+
# algorithm for a large mode; these parameters exercise both regimes
4747
"hypergeometric": ("hypergeometric", (10, 20, 5)),
4848
"hypergeometric_large_mode": ("hypergeometric", (1000, 2000, 500)),
4949
"zipf": ("zipf", (2.0,)),

‎benchmarks/benchmarks/bench_methods.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
# lognormal accepts no BoxMuller2
3838
_LOGNORMAL_METHODS = ["ICDF", "BoxMuller"]
3939
_POISSON_METHODS = ["POISNORM", "PTPE"]
40-
# PTPE uses table lookup below lam = 27 and acceptance/rejection above
40+
# MKL's PTPE poisson method may select a different internal algorithm
41+
# depending on lam (around lam = 27); these values exercise both regimes
4142
_POISSON_LAMS = [10.0, 100.0]
4243

4344

0 commit comments

Comments
 (0)