Skip to content

Performance regression in the past 9 days #118501

Description

@RivenSkaye

I'm doing the AoC and I figured I might as well upgrade after finishing day one. I re-ran benchmarks but I'm consistently getting back slowdowns.
rustup update updated my nightly toolchains as follows:

   nightly-x86_64-pc-windows-gnu updated - rustc 1.76.0-nightly (87e1447aa 2023-11-30) (from rustc 1.76.0-nightly (2f8d81f9d 2023-11-21))
   nightly-x86_64-pc-windows-msvc updated - rustc 1.76.0-nightly (87e1447aa 2023-11-30) (from rustc 1.76.0-nightly (2f8d81f9d 2023-11-21))

Code

I tried this code:
AoC repo. Run from the 2023 directory
I'll happily try and make an MRE over the weekend if anyone prefers that

I expected to see this happen: Same speed, as I'm not using any nightly-only APIs in the code being run in the benchmarks. The common utility module only uses #![feature(byte_slice_trim_ascii)] and that's only being called once.

Instead, this happened: The same safe code is consistently running slower with no changes in system load.

Old situation on my hardware:

part1bench 17.791 ns/iter (+/- 2956)
part2bench 27.777 ns/iter (+- 476)

New:

part1bench 19,953 ns/iter (+/- 3,506)
part2bench 31,927 ns/iter (+/- 675)

CPU: AMD Ryzen 7 5800H
mem: 15.4 / 16GB usable
OS: Windows 10 Home
Version: 22H2
Build: 19045.3693

Version it worked on

It most recently worked on: rustc 1.76.0-nightly (2f8d81f 2023-11-21)
Possibly later, I usually don't grab daily updates. I'll go through the other 8 to find where the performance characteristics changed.

Version with regression

rustc --version --verbose:

rustc 1.76.0-nightly (87e1447aa 2023-11-30)
binary: rustc
commit-hash: 87e1447aadaa2899ff6ccabe1fa669eb50fb60a1
commit-date: 2023-11-30
host: x86_64-pc-windows-gnu
release: 1.76.0-nightly
LLVM version: 17.0.5

I have tried both windows-gnu and windows-msvc toolchains, they both hit around the same speeds, and the same slowdown.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-slowIssue: Problems and improvements with respect to performance of generated code.P-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-untriagedUntriaged performance or correctness regression.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions