Skip to content

Performance regression in nightly with target-cpu=native on znver4 #139370

Description

@nsarlin-zama

Code

Hi, I have a regression when I try to run benchmarks using the nightly compiler on a crate that does elliptic curve operations:
In this repo: https://github.com/zama-ai/tfhe-rs, on branch v1.0 , in the crate tfhe-zk-pok, running the bench with RUSTFLAGS="-C target-cpu=znver4" cargo +nightly-2025-02-18 bench -p tfhe-zk-pok --bench pke_v2 -- pke_zk_verify_v2::PKEV2.

The machine running the bench is an aws hpc7 with an AMD EPYC 9R14 CPU.
Depending on the bench I get around 30% slower timings.

A bisect shows that the regression was introduced with nightly 2025-02-18. Stable toolchains do not seem to be impacted. The slowdown is only visible with -C target-cpu=znver4.

Version it worked on

All stable toolchains, and nightly before 2025-02-18.

Version with regression

nightly 2025-02-18 and after. The latest one as of today (2025-04-04) also has the regression.

Thank you for your help.

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

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.I-slowIssue: Problems and improvements with respect to performance of generated code.O-x86_64Target: x86-64 processors (like x86_64-*) (also known as amd64 and x64)P-highHigh 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