Skip to content

Performance regression since nightly-2022-03-05 #95409

@Robbepop

Description

@Robbepop

Today I checked performance of one of the libraries I am working on and found that its performance has regressed by roughly 50%.

Since there have not been any changes to the code since I checked last time I was confused about this.
I bisected rustc versions until I found the version where the regression started: nightly-2022-03-05
nightly-2022-03-03 was still fine.
The problem persists in the most recent Rust nighty: nightly-2022-03-28

The project that experiences the severe performance regression is wasmi: WebAssembly Interpreter.
I ran benchmarks using:

cargo bench

In particular (faster results than running the entire suite)

cargo bench tiny_keccak/v1

Git commits used for my benchmarks:

  • 805ff4ef4a7db59d6aa117218a5ca79f672db2c1 (2022-03-28)
  • 29110ed2469702b23ea6263e1a936eb2af6701c6 (2022-02-20)

In a previous issue I already highlighted that the same project has a fragile performance nature (heavily reacts to slight changes/optimizations/regressions) and was especially fine tuned using the following profile:

[profile.bench]
lto = "fat"
codegen-units = 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleI-slowIssue: Problems and improvements with respect to performance of generated code.P-lowLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions