You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replaces the Poisson rejection method implementation (#1560)
- [x] Added a `CHANGELOG.md` entry
# Summary
As discussed in #1515, this PR replaces the implementation of
`poisson::RejectionMethod` with a new algorithm based on the [paper
](https://dl.acm.org/doi/10.1145/355993.355997).
# Motivation
The new implementation offers improved performance and maintains better
sampling distribution, especially for extreme values of lambda (> 1e9).
# Details
In terms of performance, here are the benchmarks I ran, with the current
implementation as the baseline:
```text
poisson/100 time: [45.5242 cycles 45.6734 cycles 45.8337 cycles]
change: [-86.572% -86.507% -86.438%] (p = 0.00 < 0.05)
Performance has improved.
Found 5 outliers among 100 measurements (5.00%)
2 (2.00%) low mild
2 (2.00%) high mild
1 (1.00%) high severe
poisson/variable time: [5494.6626 cycles 5508.2882 cycles 5523.2298 cycles]
thrpt: [5523.2298 cycles/100 5508.2882 cycles/100 5494.6626 cycles/100]
change:
time: [-76.728% -76.573% -76.430%] (p = 0.00 < 0.05)
thrpt: [+324.27% +326.85% +329.69%]
Performance has improved.
Found 5 outliers among 100 measurements (5.00%)
1 (1.00%) low mild
3 (3.00%) high mild
1 (1.00%) high severe
```
Copy file name to clipboardexpand all lines: rand_distr/CHANGELOG.md
+1
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
48
48
This breaks serialization compatibility with older versions.
49
49
- Add plots for `rand_distr` distributions to documentation (#1434)
50
50
- Move some of the computations in Binomial from `sample` to `new` (#1484)
51
+
- Reimplement `Poisson`'s rejection method to improve performance and correct sampling inaccuracies for large lambda values, this is a Value-breaking change (#1560)
0 commit comments