Skip to content

Performance regression in 1.48.0 #79246

Closed
@marmeladema

Description

@marmeladema

Hello everyone!

We detected a performance regression on a closed-source project after an upgrade of rust from version 1.47.0 to version 1.48.0.
The benchmark we run internally are using the low-level perf_event_open Linux API to measure various hardware performance counters on specific code section.
The most stable and reliable counter we care about is the number of retired instructions, corresponding to instructions:u in classic perf output.

On certain datasets, the regressions are up to +16% in the number of instructions executed.

I used cargo-bisect-rustc as instructed on https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Performance.20regressions.20in.201.2E48.2E0 in order to search for the commit that introduced the regression:

searched nightlies: from nightly-2020-09-03 to nightly-2020-11-20
regressed nightly: nightly-2020-09-04
searched commits: from 80fc9b0 to 0d0f6b1
regressed commit: 0d0f6b1

bisected with cargo-bisect-rustc v0.6.0

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc --script=./bisect.sh 

The bisection points to #70793

I was able to reproduce the regression on two different machines.
I will also try to provide a minimized code example to reproduce the issue but that will take some time as the code being measured is quite big.

If anyone else has noticed this regression and could help me towards tools / ideas / whatever that could be of help to reproduce the issue would greatly appreciated!

EDIT:
MCVE at https://github.com/marmeladema/bitvec-perf-regression

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-slowIssue: Problems and improvements with respect to performance of generated code.T-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