Skip to content

Commit

Permalink
Add benchmarks for Beta
Browse files Browse the repository at this point in the history
  • Loading branch information
vks committed Jul 19, 2020
1 parent 56d6ac2 commit 3ca8bc2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rand_distr/benches/distributions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// except according to those terms.

#![feature(test)]
#![feature(custom_inner_attributes)]

// Rustfmt slits many macro invocations to shorten lines; in this case longer-lines are more readable
#![rustfmt::skip]
Expand Down Expand Up @@ -211,6 +212,10 @@ distr_float!(distr_normal, f64, Normal::new(-1.23, 4.56).unwrap());
distr_float!(distr_log_normal, f64, LogNormal::new(-1.23, 4.56).unwrap());
distr_float!(distr_gamma_large_shape, f64, Gamma::new(10., 1.0).unwrap());
distr_float!(distr_gamma_small_shape, f64, Gamma::new(0.1, 1.0).unwrap());
distr_float!(distr_beta_small_param, f64, Beta::new(0.1, 0.1).unwrap());
distr_float!(distr_beta_large_param_similar, f64, Beta::new(101., 95.).unwrap());
distr_float!(distr_beta_large_param_different, f64, Beta::new(10., 1000.).unwrap());
distr_float!(distr_beta_mixed_param, f64, Beta::new(0.5, 100.).unwrap());
distr_float!(distr_cauchy, f64, Cauchy::new(4.2, 6.9).unwrap());
distr_float!(distr_triangular, f64, Triangular::new(0., 1., 0.9).unwrap());
distr_int!(distr_binomial, u64, Binomial::new(20, 0.7).unwrap());
Expand Down

0 comments on commit 3ca8bc2

Please sign in to comment.