Skip to content
Edit this page View source of this page

Performance

How long polars-stats takes against scipy.stats for the same work, on one machine. Everything between here and the end of the page is generated from a benchmark run by tools/benchmarks/publish.py, which also writes the per-cell numbers to docs/assets/benchmarks/results.csv.

Measured with tools/benchmarks from one benchmark run on Apple M5 (10 cores, 24 GiB RAM, polars on 10 threads), with CPython 3.14.10, polars-stats 0.2.0 (release build), polars 2.1.0, NumPy 2.5.4 and SciPy 1.18.1.

Speedup vs scipy
median and geometric mean over each row's distributions and methods
methods 10k rows 100k rows 1M rows
median geo‑mean median geo‑mean median geo‑mean
column
pdf/pmf, log_pdf/log_pmf, cdf, log_cdf, sf, log_sf 1.3× 1.7× 4.8× 5.8× 8.2× 8.8×
ppf, isf 1.6× 2.5× 5× 6.7× 9.6× 11×
sample, samples 1.5× 1.6× 6.1× 6.8× 7.4× 9.8×
mean, variance, std 0.61× 0.59× 3.2× 3.1× 7.8× 8.6×
scalar
pdf/pmf, log_pdf/log_pmf, cdf, log_cdf, sf, log_sf 1.3× 1.7× 5.6× 6.1× 10× 11×
ppf, isf 1.4× 2.2× 4.3× 5.9× 8× 9.8×
sample, samples 1.1× 1× 5× 4.4× 7× 6.5×
mean, variance, std 0.093× 0.11× 0.097× 0.11× 0.097× 0.11×
broadcast
pdf/pmf, log_pdf/log_pmf, cdf, log_cdf, sf, log_sf 1.2× 1.6× 5.5× 6× 10× 11×
ppf, isf 1.3× 2.1× 4.3× 5.8× 8.1× 9.7×
sample, samples 0.52× 0.49× 3.3× 2.7× 5.6× 5×
mean, variance, std 0.082× 0.092× 0.086× 0.094× 0.087× 0.094×

Each cell is a speedup, the median time of scipy (scipy's frozen API on NumPy arrays already in memory) over that of polars_stats on the same method and inputs: above 1x, polars-stats is faster. A summary cell is the median, then the geometric mean, over every distribution and method in its row.

The bold row groups are the three ways to give a distribution its parameters. Each is a separate code path on both sides, so compare within a group, never across:

  • column: every parameter is a column, so each row has its own distribution (the per-row workload polars-stats is built for).
  • scalar: every parameter is a Python number, which takes polars-stats' constant-parameter fast path.
  • broadcast: every parameter is a length-1 expression such as pl.lit(2.0), broadcast to every row.

In scalar and broadcast a moment is a single number, so its time is almost all the fixed cost of building and collecting a query, which scipy does not pay.

scipy is scipy at its cheapest. Inside a Polars pipeline, and above all a LazyFrame, it also pays to move the data out and the result back in (to_numpy() and a new column, or a map_batches call): a fixed cost per call plus one copy of the data. The speedup a pipeline sees is therefore larger, most of all at small row counts (measured here).

Cells whose outputs failed the correctness check or that ran while the machine's load rose by more than 1 are left out. The numbers belong to this machine, so measure on yours before relying on them: clone the repository, build it with make install-release and run:

uv run --group tools -m tools.benchmarks.run --rows 10_000 100_000 1_000_000 --challengers scipy
Every cell in the column regime
column regime
speedup vs scipy at each row count
density and probabilities quantiles sampling moments
pdf/pmf log_pdf/log_pmf cdf log_cdf sf log_sf ppf isf sample samples ×5 samples ×10 samples ×20 mean variance std
bernoulli 10k 2.9× 2.4× 1.3× 1.2× 1.2× 1.1× 6.7× 6.9× 0.67× 2.2× 4.6× 8.6× 0.66× 0.51× 0.54×
100k 23× 14× 11× 7.1× 8.7× 6× 47× 50× 6.6× 17× 32× 48× 4.2× 3.1× 3.2×
1M 93× 26× 44× 17× 39× 15× 172× 194× 22× 46× 66× 75× 21× 14× 12×
beta 10k 2.2× 2.5× 5.5× 35× 5.4× 34× 9.4× 9.4× 0.65× 1.5× 2.6× 3.8× 1.1× 0.84× 0.85×
100k 4.6× 6.6× 8.7× 55× 8.4× 54× 11× 11× 3× 5.3× 6.5× 7.5× 6.2× 4.9× 4.8×
1M 5.1× 7.8× 9.1× 56× 8.7× 56× 12× 12× 5.3× 6.9× 7.3× 7.6× 16× 9× 8.6×
binomial 10k 2.7× 3.2× 1.2× 1.3× 1.2× 1.4× 2.4× 2.4× 1× 3.8× 6.9× 11× 0.53× 0.51× 0.53×
100k 9.2× 13× 2.2× 2.4× 2.2× 2.4× 2.8× 2.8× 5.9× 13× 17× 21× 2.7× 2.4× 2.5×
1M 13× 19× 2.4× 2.6× 2.4× 2.6× 3.2× 3.1× 8.3× 17× 20× 22× 6.8× 5.9× 5.9×
cauchy 10k 0.56× 2.1× 1.2× 1.9× 0.93× 1.9× 1.6× 1.7× 0.41× 1× 1.9× 3.3× – – –
100k 3.4× 10× 5.1× 9.3× 6.7× 9.9× 7.9× 7.7× 2.4× 4.8× 6.8× 8.4× – – –
1M 12× 15× 7.4× 12× 7.7× 11× 16× 16× 4.6× 6.9× 8.2× 8.7× – – –
chisquared 10k 1.3× 1.5× 2.4× 11× 2.9× 10× 3.6× 4.2× 0.46× 1× 1.9× 3.2× 0.71× 0.64× 0.61×
100k 4.9× 5.5× 4.3× 18× 5× 17× 4.3× 4.9× 2.6× 4.9× 6.7× 8.1× 4.9× 4.3× 3.5×
1M 6.8× 7.8× 4.5× 18× 5.2× 18× 4.6× 5.3× 5.4× 7.4× 8× 8.6× 28× 21× 13×
discrete_uniform 10k 0.69× 0.82× 1.4× 1.3× 1.3× 1.3× 1.3× 1.3× 17× 48× 101× 179× 0.55× 0.72× 0.72×
100k 2.8× 3× 5.6× 4.4× 5.4× 4.4× 5.8× 5.8× 130× 305× 529× 850× 2.2× 3.5× 3.4×
1M 5.6× 5.4× 11× 6.5× 10× 6.1× 13× 14× 375× 641× 795× 955× 3.7× 8.2× 8×
exponential 10k 0.71× 0.89× 0.87× 1.8× 0.81× 0.69× 1.4× 1.3× 0.19× 0.39× – 1.4× 0.39× 0.32× 0.41×
100k 3.8× 4.3× 4.4× 8.4× 4.1× 4.3× 6.1× 6× 1.2× 2.6× 4.4× 6.9× 2.3× 2.1× 2.3×
1M 10× 9.7× 8.5× 14× 12× 19× 14× 15× 3.4× 5.3× 6.7× 8× 13× 9.3× 13×
gamma 10k 1.2× 1.4× 2.2× 10× 2.6× 10× 3.6× 4.2× 0.42× 0.97× 1.9× 3.1× 0.44× 0.36× 0.44×
100k 3.8× 4.7× 4× 17× 4.6× 17× 4.3× 4.9× 2.4× 4.7× 6.4× 7.8× 2.3× 2× 2.3×
1M 4.8× 6.3× 4.1× 17× 4.7× 17× 4.6× 5.2× 5.2× 7.1× 7.5× 8.2× 7.6× 5× 5.9×
geometric 10k 0.75× 0.79× 0.9× 1× 0.88× 0.72× 1.7× 1.7× 0.36× 1.1× 2.3× 4.2× 0.84× 0.74× 0.78×
100k 4× 5.4× 3.2× 3.6× 3.9× 3.8× 7.8× 8.5× 2.9× 6.8× 10× 14× 5.6× 4.7× 4.8×
1M 7.5× 11× 4.7× 4.6× 7.6× 8.7× 14× 16× 5.2× 12× 13× 15× 28× 14× 15×
gumbel 10k 0.76× 0.91× 0.82× 0.78× 1.1× 1.7× 1.3× 1.4× 0.33× 0.83× 1.5× 2.4× 0.31× 0.29× 0.37×
100k 3.2× 4.5× 3.5× 4× 4.2× 6.9× 5.1× 5× 1.8× 3.5× 4.4× 5.3× 1.7× 1.7× 2×
1M 5.5× 6.8× 6× 8.2× 6.3× 9.4× 8.5× 8.1× 2.9× 4.8× 5.1× 5.5× 4.9× 4.8× 7×
laplace 10k 0.72× 1.1× 1.3× 2× 1.3× 2.2× 1.5× 1.5× 0.21× 0.89× 1.8× 3.1× 0.37× 0.3× 0.39×
100k 3.4× 6.2× 8.4× 10× 8.4× 11× 7.8× 7.9× 2.2× 5.1× 7.4× 9.5× 1.9× 1.8× 2.1×
1M 7.8× 14× 19× 14× 20× 14× 17× 17× 5.2× 7.8× 9.1× 10× 7.3× 5.2× 7.3×
lognormal 10k 1.3× 2.1× 1.2× 1.2× 1.1× 1.3× 1.5× 1.7× 0.27× 0.7× 1.3× 2.4× 0.77× 0.5× 0.49×
100k 5.7× 6.5× 4.4× 4.6× 4.4× 4.6× 4.1× 4.6× 1.7× 3.4× 5.3× 6.3× 3.5× 2.1× 2×
1M 11× 12× 4.6× 5.6× 4.7× 5.3× 5.4× 5.6× 3.4× 5.2× 6.2× 7× 7.8× 3× 3.1×
negativebinomial 10k 1.9× 2.2× 5.6× 10× 5.7× 5.7× 24× 25× 1.2× 3.1× 4.8× 6.7× 0.66× 0.63× 0.67×
100k 4.1× 5.6× 8.7× 16× 8.8× 8.8× 30× 30× 4.9× 7.8× 8.9× 9.8× 3.9× 3.8× 3.9×
1M 4.5× 6.3× 8.9× 16× 8.9× 8.9× 31× 31× 6.9× 9.2× 9.6× 10× 10× 8.2× 9.5×
normal 10k 0.69× 0.72× 0.96× 1.1× 1× 1.1× 1.5× 1.3× 0.17× 0.4× 0.75× 1.5× 0.35× 0.33× 0.37×
100k 3.7× 4.1× 4.7× 5.1× 4.7× 4.9× 4.9× 5× 1.2× 2.5× 4.3× 6.8× 1.9× 1.8× 2.1×
1M 9.4× 8.5× 5.7× 6.3× 5.7× 6.2× 7.1× 7.1× 3.5× 5.3× 6.4× 7× 6.8× 6.3× 7.4×
pareto 10k 0.85× 1.2× 0.81× 2.2× 0.87× 2.6× 1.1× 1.2× 0.34× 0.79× 1.4× 2.4× 0.6× 0.54× 0.61×
100k 3.2× 5.1× 2.5× 8.4× 3.2× 15× 4.4× 4.7× 1.9× 3.7× 5.2× 6.4× 3.7× 3.2× 3.3×
1M 5.4× 8.1× 3.6× 12× 5.6× 32× 8× 9× 4× 5.8× 6.3× 6.9× 9.3× 6.9× 7.3×
poisson 10k 1.1× 1× 2.3× 2.4× 2.3× 2.4× 22× 22× 0.96× 3× 5.2× 8.5× 1.1× 1× 1×
100k 3.8× 3.7× 4.2× 4.3× 4.4× 4.5× 29× 29× 5.2× 10× 14× 16× 6.1× 6.2× 5.3×
1M 4.5× 4.5× 4.6× 4.7× 4.7× 4.8× 31× 30× 8.3× 12× 14× 16× 34× 35× 26×
studentst 10k 2.1× 2.1× 3.1× 3.6× 3.1× 3.6× 2.2× 2.3× 0.42× 1.1× 1.9× 3.1× 1.7× 1.4× 1.5×
100k 4.3× 4.5× 4.7× 5.9× 4.7× 5.8× 2.7× 2.7× 2× 4.4× 5.6× 6.9× 10× 8.1× 8.2×
1M 4.8× 5.7× 5× 6.3× 4.9× 6.2× 3× 2.9× 3× 6.5× 7.7× 8.5× 30× 17× 19×
triangular 10k 1.9× 2× 1.8× 3.2× 1.9× 3.3× 0.87× 0.88× 0.42× 1.2× 2.3× 4.4× 0.85× 0.68× 0.64×
100k 12× 8.4× 9.8× 17× 10× 16× 3.7× 3.7× 2.6× 7.2× 11× 17× 5.1× 3.9× 3.6×
1M 27× 13× 17× 23× 17× 23× 6.4× 6.6× 4.5× 10× 13× 17× 8.8× 5.4× 4.7×
uniform 10k 0.62× 1× 0.64× 1.7× 0.61× 1.6× 1.1× 1× 0.17× 0.36× 0.67× 1.3× 0.35× 0.34× 0.38×
100k 3.5× 5× 3.7× 9.3× 3.7× 9.2× 4.6× 4.9× 1.1× 2.3× 4.2× 7.1× 1.8× 1.8× 2×
1M 12× 9.5× 12× 15× 12× 14× 10× 10× 3.1× 5.1× 6.5× 7.6× 4.1× 4.6× 5.6×
weibull 10k 1.2× 1.5× 1× 2.2× 0.9× 0.81× 1.2× 1× 0.43× 1× 1.9× 3.1× 0.71× 0.79× 0.82×
100k 3.9× 5.4× 3× 7× 2.7× 2.8× 3× 3.3× 2.2× 4.1× 5.4× 6.5× 2× 1.9× 1.9×
1M 5.1× 6.2× 3.9× 8.6× 3.4× 3.5× 4.8× 4.7× 3.6× 5.6× 6.2× 6.7× 3× 2.3× 2.4×
– marks a cell that was not measured (a moment the distribution does not define) or that was left out after a failed check.
Every cell in the scalar regime
scalar regime
speedup vs scipy at each row count
density and probabilities quantiles sampling moments
pdf/pmf log_pdf/log_pmf cdf log_cdf sf log_sf ppf isf sample samples ×5 samples ×10 samples ×20 mean variance std
bernoulli 10k 3.3× 2.7× 1.2× 1.3× 1.1× 1.2× 4.5× 4.5× 0.25× 0.75× 1.5× 2.8× 0.09× 0.085× 0.093×
100k 20× 18× 8× 8× 6.6× 7.1× 27× 27× 2.3× 5.6× 9.6× 15× 0.095× 0.088× 0.086×
1M 71× 64× 30× 31× 20× 25× 99× 98× 5.9× 14× 20× 26× 0.097× 0.089× 0.085×
beta 10k 2.3× 1.6× 1.1× 23× 1.1× 23× 6.5× 6.2× 0.58× 1.4× 2.5× 3.8× 0.14× 0.13× 0.13×
100k 4.6× 3.8× 1.9× 55× 2× 54× 7.9× 7.6× 3× 5.3× 6.4× 7.4× 0.14× 0.14× 0.14×
1M 5.2× 4.6× 2.1× 63× 2.2× 61× 8.9× 8.3× 4.5× 7.1× 7.3× 7.6× 0.15× 0.14× 0.13×
binomial 10k 2.9× 3× 1× 1.1× 1× 1.2× 2.1× 2.1× 0.43× 1.3× 2.4× 3.9× 0.092× 0.093× 0.096×
100k 8.7× 12× 1.7× 2.1× 1.6× 2.1× 2.4× 2.5× 3× 5.6× 7× 8.2× 0.095× 0.1× 0.097×
1M 13× 18× 2× 2.4× 2× 2.4× 2.6× 2.7× 5.7× 7.6× 8× 8.6× 0.091× 0.1× 0.099×
cauchy 10k 0.59× 2.1× 0.99× 2× 0.93× 2× 1.6× 1.6× 0.46× 1.1× 2× 3.5× – – –
100k 2.6× 10× 7× 10× 7.2× 10× 6.4× 6.4× 2.7× 5.1× 7.3× 8.7× – – –
1M 9.6× 21× 8× 12× 7.9× 12× 12× 12× 4.6× 8.4× 8.7× 9.5× – – –
chisquared 10k 1.6× 2× 2.6× 9.8× 2.4× 9.6× 3.7× 3.7× 0.36× 0.83× 1.5× 2.6× 0.092× 0.099× 0.094×
100k 6.6× 7.9× 4.2× 16× 4.2× 16× 4.2× 4.3× 2.1× 4.1× 5.5× 6.7× 0.096× 0.1× 0.091×
1M 12× 17× 4.4× 17× 4.3× 17× 4.6× 4.7× 3.9× 5.9× 6.5× 7.2× 0.1× 0.094× 0.092×
discrete_uniform 10k 0.85× 0.99× 1× 1× 0.97× 1× 1.3× 1.3× 0.15× 0.24× 0.45× 0.81× 0.11× 0.12× 0.12×
100k 4.8× 6.2× 6.3× 4.5× 5.8× 4.1× 6× 6.3× 0.66× 1.4× 2.3× 3.5× 0.12× 0.12× 0.13×
1M 18× 25× 23× 7.9× 20× 6.6× 18× 20× 1.4× 3.2× 3.4× 3.6× 0.12× 0.12× 0.13×
exponential 10k 0.71× 0.71× 0.97× 1.8× 0.75× 0.56× 1.1× 0.96× 0.19× 0.37× 0.7× 1.4× 0.082× 0.08× 0.085×
100k 3.2× 3.6× 4.2× 8.5× 3.6× 2.7× 4.8× 4.3× 1.1× 2.8× 4.6× 7.5× 0.083× 0.081× 0.082×
1M 9.4× 13× 7.8× 14× 11× 10× 11× 11× 2.4× 7.3× 7.4× 9× 0.084× 0.079× 0.084×
gamma 10k 1.3× 1.5× 2.3× 15× 2.1× 15× 4× 4× 0.35× 0.8× 1.5× 2.5× 0.084× 0.078× 0.079×
100k 5.4× 6.7× 5.8× 37× 5.7× 36× 5.3× 5.3× 2× 3.9× 5.5× 6.7× 0.085× 0.079× 0.083×
1M 10× 15× 6.5× 41× 6.2× 41× 5.8× 5.8× 3.9× 6.3× 6.5× 7.2× 0.081× 0.077× 0.081×
geometric 10k 0.92× 1× 1.1× 1.1× 1.1× 0.83× 2× 2.1× 0.29× 0.59× 1× 1.9× 0.13× 0.12× 0.13×
100k 5.4× 6.7× 4.5× 5× 5.6× 4.4× 9.4× 11× 1.5× 3.1× 4.8× 6.3× 0.14× 0.12× 0.12×
1M 14× 25× 8.6× 7.1× 16× 16× 19× 24× 3.3× 5.7× 6.4× 7.1× 0.13× 0.12× 0.12×
gumbel 10k 0.77× 0.99× 0.83× 0.89× 1.1× 1.8× 1× 1.1× 0.22× 0.86× 1.5× – 0.08× 0.08× 0.084×
100k 3.3× 4.4× 3.5× 4× 4.2× 7× 3.9× 4.1× 1.8× 3.6× 4.6× 5.4× 0.084× 0.081× 0.086×
1M 5.8× 8.3× 6.3× 7.8× 6.6× 9.8× 6.5× 6.5× 3.1× 5× 5.2× 5.7× 0.081× 0.077× 0.082×
laplace 10k 0.75× 1.2× 1.3× 2.4× 1.3× 2× 1.3× 1.3× 0.2× 0.8× 1.8× 3.2× 0.078× 0.076× 0.081×
100k 3.3× 6.2× 8.5× 11× 8.5× 10× 6.3× 6.4× 2.4× 5.3× 7.7× 10× 0.081× 0.079× 0.077×
1M 8× 23× 21× 16× 21× 16× 14× 14× 5.5× 9.6× 9.8× 11× 0.08× 0.073× 0.08×
lognormal 10k 1.4× 1.4× 1.2× 1.2× 1.2× 1.2× 1.3× 1.2× 0.27× 0.71× 1.4× 2.4× 0.12× 0.091× 0.085×
100k 5.7× 5.9× 4.4× 5× 4.5× 4.5× 4.2× 4.3× 1.6× 3.6× 5× 6× 0.13× 0.094× 0.079×
1M 11× 12× 4.9× 6.4× 5× 5.9× 5.8× 6.3× 2.8× 5.3× 6× 6.5× 0.12× 0.097× 0.083×
negativebinomial 10k 1.8× 1.9× 5.1× 8.5× 4.9× 5× 17× 16× 1.3× 3.1× 4.8× 5.6× 0.085× 0.09× 0.091×
100k 3.7× 4.7× 8.3× 15× 8.1× 8× 22× 21× 4.9× 7.9× 8.9× 9.6× 0.087× 0.086× 0.087×
1M 4.2× 5.5× 9.4× 17× 9.2× 9.2× 24× 23× 6.5× 9.2× 9.5× 9.8× 0.089× 0.087× 0.093×
normal 10k 0.74× 0.76× 0.95× 0.92× 1× 0.88× 1.1× 1.1× 0.18× 0.38× 0.73× 1.4× 0.074× 0.079× 0.077×
100k 3.5× 3.7× 4× 4.3× 4.5× 3.5× 3.7× 3.7× 1.1× 2.6× 4.4× 7× 0.078× 0.074× 0.072×
1M 9.6× 14× 5.7× 5.8× 5.9× 5.7× 5.4× 5.4× 2.3× 6.9× 7× 7.7× 0.075× 0.079× 0.077×
pareto 10k 0.96× 1.2× 0.92× 2.3× 0.88× 3× 1× 1.1× 0.36× 0.77× 1.5× 2.5× 0.095× 0.1× 0.1×
100k 3.2× 5× 2.7× 8.9× 3.3× 16× 3.6× 3.9× 1.9× 3.9× 5.5× 6.6× 0.099× 0.097× 0.1×
1M 5.4× 8.8× 4× 13× 5.6× 34× 6.5× 7.7× 3.6× 6.6× 6.6× 7.1× 0.1× 0.098× 0.1×
poisson 10k 1.6× 1.5× 1.7× 1.8× 1.8× 1.8× 27× 27× 1.1× 2.5× 4.3× 6.7× 0.21× 0.21× 0.21×
100k 11× 12× 3.3× 3.6× 3.5× 3.7× 42× 41× 5.2× 9.4× 11× 13× 0.22× 0.21× 0.22×
1M 28× 37× 3.7× 4.1× 4× 4.1× 44× 43× 7.6× 12× 13× 14× 0.21× 0.21× 0.22×
studentst 10k 3.2× 3× 5.1× 5.8× 5× 5.7× 2.6× 2.6× 0.46× 1.1× 1.9× 3.1× 0.36× 0.36× 0.35×
100k 11× 12× 9.3× 11× 9.3× 11× 3.1× 3.1× 2.4× 4.7× 6.1× 7.1× 0.37× 0.37× 0.36×
1M 19× 24× 9.9× 12× 9.9× 12× 3.3× 3.3× 4.2× 7.3× 7.7× 8.7× 0.37× 0.37× 0.35×
triangular 10k 2.1× 2.2× 2.3× 4.1× 2.2× 3.9× 0.86× 0.89× 0.22× 0.69× 1.4× 2.5× 0.11× 0.11× 0.1×
100k 12× 9.3× 12× 18× 12× 17× 3.9× 4× 2.1× 4.9× 8× 11× 0.12× 0.11× 0.1×
1M 45× 13× 33× 30× 33× 31× 9.7× 10× 4.7× 10× 12× 13× 0.12× 0.11× 0.1×
uniform 10k 0.61× 0.99× 0.55× 1.9× 0.56× 1.8× 0.65× 0.69× 0.18× 0.36× 0.64× 1.3× 0.079× 0.078× 0.08×
100k 2.7× 5.2× 2.6× 10× 2.7× 9.8× 2.6× 2.9× 1.1× 2.7× 4.8× 8.2× 0.08× 0.077× 0.19×
1M 10× 19× 9.5× 18× 10× 17× 7.1× 7.5× 2.5× 7.2× 8.2× 9.5× 0.077× 0.078× 0.058×
weibull 10k 1.3× 1.6× 1.2× 2.3× 0.97× 0.9× 1.2× 1× 0.45× 1.1× 1.9× 3.2× 0.1× 0.12× 0.13×
100k 3× 5.6× 3.1× 7.2× 2.6× 2.5× 3.2× 3× 2.3× 4.6× 5.8× 6.8× 0.099× 0.13× 0.13×
1M 4.8× 6.8× 4.1× 9× 3.5× 3.5× 3.9× 3.8× 4.1× 6.5× 6.6× 7× 0.11× 0.14× 0.13×
– marks a cell that was not measured (a moment the distribution does not define) or that was left out after a failed check.
Every cell in the broadcast regime
broadcast regime
speedup vs scipy at each row count
density and probabilities quantiles sampling moments
pdf/pmf log_pdf/log_pmf cdf log_cdf sf log_sf ppf isf sample samples ×5 samples ×10 samples ×20 mean variance std
bernoulli 10k 3.1× 2× 1.2× 1.2× 1.1× 1.2× 4.4× 4.4× 0.15× 0.46× 0.96× 1.8× 0.081× 0.075× 0.078×
100k 19× 17× 7.7× 7.9× 6.3× 6.8× 27× 26× 1.1× 3.6× 6.5× 10× 0.09× 0.071× 0.08×
1M 70× 64× 30× 31× 24× 26× 98× 97× 3.9× 9.7× 16× 21× 0.085× 0.076× 0.073×
beta 10k 2.2× 1.5× 1× 22× 1.1× 22× 6.4× 6.1× 0.21× 0.74× 1.4× 2.3× 0.13× 0.12× 0.13×
100k 4.6× 3.7× 1.9× 55× 2× 53× 7.9× 7.5× 1.4× 3.7× 5× 6.3× 0.13× 0.13× 0.12×
1M 5.2× 4.6× 2.1× 63× 2.2× 61× 8.6× 8.5× 3.6× 6× 6.7× 7.2× 0.14× 0.12× 0.12×
binomial 10k 2.7× 2.8× 0.99× 1.1× 0.98× 1.2× 2× 2.1× 0.16× 0.64× 1.2× 2.2× 0.089× 0.089× 0.092×
100k 9.3× 11× 1.7× 2.1× 1.6× 2.1× 2.4× 2.5× 1.2× 3.3× 4.9× 6.5× 0.09× 0.093× 0.091×
1M 13× 18× 2× 2.4× 2× 2.4× 2.7× 2.7× 2.6× 5.4× 6.6× 7.7× 0.091× 0.095× 0.095×
cauchy 10k 0.54× 1.9× 0.87× 1.9× 0.94× 1.9× 1.4× 1.4× 0.15× 0.52× 1× 1.9× – – –
100k 2.4× 11× 5.5× 9.4× 6.7× 9.7× 6.3× 6.3× 1.1× 3.2× 5× 6.8× – – –
1M 9.4× 21× 7.9× 12× 7.9× 12× 12× 12× 3.5× 6.5× 7.3× 8.5× – – –
chisquared 10k 1.6× 1.7× 2.4× 9.7× 2.4× 9.5× 3.7× 3.7× 0.17× 0.52× 1× 1.8× 0.087× 0.08× 0.082×
100k 6.5× 7.8× 4.2× 16× 4.2× 16× 4.2× 4.3× 1.2× 3× 4.4× 5.7× 0.092× 0.083× 0.079×
1M 12× 17× 4.4× 17× 4.3× 17× 4.6× 4.7× 3.1× 5.2× 5.8× 6.6× 0.086× 0.087× 0.079×
discrete_uniform 10k 0.74× 0.91× 0.96× 0.87× 0.87× 0.9× 1.2× 1.3× 0.048× 0.12× 0.21× 0.41× 0.094× 0.11× 0.11×
100k 4.4× 5.7× 6× 4.3× 5.4× 4.1× 5.6× 5.7× 0.24× 0.78× 1.4× 2.5× 0.1× 0.11× 0.11×
1M 18× 23× 21× 7.6× 19× 6.5× 17× 20× 0.83× 2.1× 2.9× 3.7× 0.097× 0.1× 0.11×
exponential 10k 0.66× 0.71× 0.86× 1.8× 0.71× 0.56× 1.1× 0.93× 0.086× 0.25× 0.48× 0.95× 0.071× 0.067× 0.065×
100k 3.4× 3.7× 4.1× 8.4× 3.5× 2.6× 4.6× 4.3× 0.61× 1.7× 3.2× 5.4× 0.064× 0.062× 0.068×
1M 9.4× 14× 7.8× 13× 10× 10× 11× 10× 1.9× 4.5× 6.1× 7.5× 0.069× 0.063× 0.067×
gamma 10k 1.4× 1.4× 2.1× 15× 2.1× 14× 3.9× 4× 0.11× 0.4× 0.76× 1.4× 0.064× 0.065× 0.067×
100k 5.5× 6.7× 5.8× 36× 5.6× 36× 5.3× 5.3× 0.82× 2.4× 3.8× 5.2× 0.072× 0.065× 0.068×
1M 10× 15× 6.4× 41× 6.2× 41× 5.8× 5.8× 2.6× 5.1× 5.8× 6.5× 0.07× 0.068× 0.068×
geometric 10k 0.9× 1× 1× 1.1× 1.1× 0.78× 1.9× 1.9× 0.13× 0.37× 0.71× 1.3× 0.12× 0.091× 0.11×
100k 5.3× 6.6× 4.4× 5× 5.7× 4.2× 9.1× 10× 0.77× 2.3× 3.7× 5.3× 0.13× 0.1× 0.12×
1M 14× 25× 8.6× 7× 15× 16× 19× 24× 1.9× 4.4× 5.6× 6.4× 0.12× 0.11× 0.12×
gumbel 10k 0.75× 0.89× 0.77× 0.85× 1× 1.7× 0.94× 1× 0.11× 0.43× 0.79× 1.4× 0.063× 0.061× 0.069×
100k 3.2× 4.4× 3.4× 4× 4.1× 6.8× 3.8× 3.9× 0.86× 2.4× 3.4× 4.5× 0.068× 0.063× 0.07×
1M 5.7× 8.2× 6.2× 7.6× 6.6× 9.7× 6.4× 6.5× 2.3× 4.3× 4.8× 5.4× 0.066× 0.066× 0.064×
laplace 10k 0.71× 1.2× 1.2× 2.2× 1.2× 2× 1.2× 1.2× 0.066× 0.42× 0.83× 1.7× 0.062× 0.057× 0.063×
100k 3.2× 6.2× 8× 10× 8.3× 10× 6.1× 6.1× 0.93× 3.1× 5.2× 7.1× 0.066× 0.058× 0.062×
1M 8× 23× 20× 16× 21× 16× 14× 14× 3.2× 6.8× 8.4× 9.7× 0.06× 0.059× 0.061×
lognormal 10k 1.3× 1.3× 1.1× 1.1× 1.1× 1.2× 1.1× 1.2× 0.082× 0.34× 0.69× 1.3× 0.11× 0.084× 0.074×
100k 5.7× 5.7× 3.9× 4.8× 4× 4.8× 4.2× 4.2× 0.74× 2.3× 3.5× 4.7× 0.1× 0.086× 0.076×
1M 11× 12× 4.5× 5.3× 4.9× 6× 5.7× 5.9× 2.2× 4.2× 5.2× – 0.11× 0.091× 0.075×
negativebinomial 10k 1.8× 1.9× 5× 8.3× 4.8× 4.9× 17× 16× 0.43× 1.7× 2.9× 4.7× 0.075× 0.082× 0.081×
100k 3.6× 4.7× 8.3× 14× 8× 8× 22× 21× 3× 6.2× 7.7× 8.8× 0.084× 0.079× 0.079×
1M 4.2× 5.5× 9.5× 17× 9.2× 9.3× 24× 23× 5.6× 8.5× 9.1× 9.5× 0.078× 0.082× 0.08×
normal 10k 0.74× 0.75× 0.96× 0.92× 0.95× 1× 1.1× 1.2× 0.057× 0.19× 0.35× 0.69× 0.063× 0.061× 0.064×
100k 3.5× 3.7× 4.6× 4.5× 4.7× 3.6× 3.8× 3.6× 0.41× 1.4× 2.6× 4.3× 0.065× 0.066× 0.068×
1M 9.6× 15× 5.8× 5.9× 6× 5.8× 5.4× 5.5× 1.6× 3.9× 5.1× 6.9× 0.064× 0.064× 0.068×
pareto 10k 0.83× 1.2× 0.85× 2.2× 0.85× 2.6× 0.96× 0.96× 0.11× 0.38× 0.73× 1.3× 0.078× 0.092× 0.089×
100k 3.1× 5× 2.6× 8.8× 3.1× 16× 3.5× 3.9× 0.79× 2.4× 3.8× 5.1× 0.08× 0.089× 0.087×
1M 5.3× 8.8× 3.9× 13× 5.5× 34× 6.5× 7.7× 2.4× 5× 5.8× 6.5× 0.09× 0.087× 0.092×
poisson 10k 1.6× 1.4× 1.7× 1.7× 1.7× 1.8× 28× 27× 0.47× 1.6× 3× 4.9× 0.2× 0.21× 0.2×
100k 11× 12× 3.3× 3.6× 3.5× 3.7× 41× 41× 3× 6.8× 9.4× 12× 0.23× 0.21× 0.2×
1M 28× 37× 3.7× 4.1× 4× 4.1× 43× 43× 5.6× 8.8× 11× 13× 0.22× 0.21× 0.2×
studentst 10k 2.8× 2.7× 4.8× 5.5× 4.8× 5.4× 2.6× 2.6× 0.11× 0.42× 0.77× 1.4× 0.32× 0.35× 0.35×
100k 11× 11× 9.3× 11× 9.3× 11× 3× 3.1× 0.77× 2.6× 3.8× 5.2× 0.33× 0.36× 0.35×
1M 18× 24× 9.9× 12× 9.9× 12× 3.4× 3.4× 2.1× 5.8× 7.1× 7.7× 0.37× 0.32× 0.34×
triangular 10k 2× 1.9× 1.7× 3.4× 1.8× 3.4× 0.75× 0.77× 0.042× 0.24× 0.52× 1× 0.097× 0.093× 0.091×
100k 11× 8.8× 11× 17× 12× 18× 3.5× 3.6× 0.52× 2× 3.8× 6.2× 0.11× 0.092× 0.091×
1M 43× 13× 33× 29× 33× 30× 9.4× 9.9× 2× 5.1× 7× 9.3× 0.1× 0.1× 0.087×
uniform 10k 0.57× 0.68× 0.55× 2× 0.56× 1.6× 0.63× 0.63× 0.052× 0.16× 0.32× 0.62× 0.055× 0.063× 0.065×
100k 2.6× 5× 2.6× 9.9× 2.6× 9.7× 2.7× 2.8× 0.36× 1.2× 2.4× 4.4× 0.062× 0.06× 0.065×
1M 10× 19× 9.4× 17× 10× 17× 7.1× 7.5× 1.4× 3.7× 5.1× 6.8× 0.058× 0.061× 0.066×
weibull 10k 1.3× 1.5× 1.1× 2.3× 0.88× 0.83× 1.1× 1× 0.14× 0.54× 1× 1.8× 0.081× 0.12× 0.11×
100k 3.7× 4.7× 3× 7.1× 2.7× 2.8× 3.2× 3.1× 1.1× 3.1× 4.4× 5.6× 0.086× 0.11× 0.12×
1M 4.9× 6.8× 4× 8.9× 3.5× 3.6× 3.9× 3.8× 2.8× – 6× 6.6× 0.083× 0.11× 0.11×
– marks a cell that was not measured (a moment the distribution does not define) or that was left out after a failed check.