Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Robbepop opened this issue Mar 28, 2022 · 3 comments
Open

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

Robbepop opened this issue Mar 28, 2022 · 3 comments
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-slow Issue: Problems and improvements with respect to performance of generated code. P-low Low priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Robbepop
Copy link
Contributor

Robbepop commented Mar 28, 2022

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
@Robbepop Robbepop added C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. labels Mar 28, 2022
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Mar 28, 2022
@apiraino apiraino added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. O-wasm Target: WASM (WebAssembly), http://webassembly.org/ labels Apr 14, 2022
@apiraino
Copy link
Contributor

In your opinion @Robbepop would it help trying to extract an MCVE from your project and try to reduce the code that could be causing this regression? Or maybe it's more a general question about performance of the code generated?

@apiraino apiraino added the I-slow Issue: Problems and improvements with respect to performance of generated code. label Apr 14, 2022
@Robbepop
Copy link
Contributor Author

@apiraino thank you for your response.
I guess it would be very helpful for both parties to diagnose this performance issue further by minimizing it to its core components.
However, the wasmi interpreter is a kinda big project and I (as its main developer) have absolutely no clue where to even start minimizing. It will probably a very time consuming task and I unfortunately have not (yet) come to do this.

Btw.: The O-wasm label is incorrect since this is not about Wasm compilation. The performance regressions happen on native compilation.

@lqd lqd removed the O-wasm Target: WASM (WebAssembly), http://webassembly.org/ label Apr 14, 2022
@JohnTitor JohnTitor added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label May 23, 2022
@workingjubilee workingjubilee added P-low Low priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. and removed regression-untriaged Untriaged performance or correctness regression. I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Mar 3, 2023
@jieyouxu
Copy link
Member

jieyouxu commented Sep 8, 2024

Triage: @Robbepop do you mind checking if the latest nightlies still have as severe of a perf regression as the old nightly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-slow Issue: Problems and improvements with respect to performance of generated code. P-low Low priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

7 participants