Skip to content

Make our analyses more statistically rigorous - #345

Merged
fitzgen merged 10 commits into
bytecodealliance:mainfrom
fitzgen:more-rigorous-stats
Oct 14, 2026
Merged

fitzgen merged 10 commits into
bytecodealliance:mainfrom
fitzgen:more-rigorous-stats

Conversation

@fitzgen

@fitzgen fitzgen commented Oct 14, 2026

Copy link
Copy Markdown
Member

See each commit for details.

Instead, just calculate it after the fact, which doesn't require suspect
rescaling.
`median` now interpolates like `percentile_from_sorted`, which the two disagreed
on for even-length input, so `Summary::median` becomes an `f64`.

`std_deviation` uses the sample formula, matching the variance the significance
tests already use. Sorting speed ups no longer panics on `NaN`, and `report`
defaults to the same significance level as the other subcommands.
These divided by the sum of the two values rather than the baseline, so a
10% regression read 4.76%. Both now use a shared `percent_change`, which
`report.rs` had reimplemented with a third, symmetric convention. The p25
delta becomes a median delta, matching the statistic being tested.
Nothing uses this yet.
Three samples of a deterministic counter cannot reach a 1% significance level
however far apart they lie. Six can.
@fitzgen
fitzgen requested a review from cfallin October 14, 2026 20:20
@fitzgen

fitzgen commented Oct 14, 2026

Copy link
Copy Markdown
Member Author

r? @cfallin

@cfallin cfallin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I will freely admit I don't have a deep understanding of the stats here (due to lack of deep background), so all of the actual analysis I will rank as "plausible". But at an implementation level, the code looks fine, so I'm happy to see it merged.

@fitzgen
fitzgen merged commit 32b5ef2 into bytecodealliance:main Oct 14, 2026
11 checks passed
@fitzgen
fitzgen deleted the more-rigorous-stats branch October 14, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants