Skip to content

LLVM 6 upgrade caused ~25% runtime regression for inflate 0.3.4 decoding #50560

Closed
@anp

Description

@anp

After bisecting, 39abcc0 introduced a roughly 25% increase in the runtime of lolbench's inflate_0_3_4::decode benchmark.

Summary:

rust-lang/rust commit est. runtime 95% ci
3bcda48 1.5933 ms 1.5778,1.6081
39abcc0 1.9997 ms 1.9914,2.0083
change ~ 25 %

The regression is (hopefully) reproducible by cloning:

$ git clone https://github.com/anp/inflate-regression
$ cd inflate-regression

(note: I haven't reduced this beyond the inflate crate's public API -- I need to try to find the actual section of code that's affected)

Here's my output (2016 MBP15). I ran these on my laptop after seeing the change on a x86_64-unknown-linux-gnu machine first.

(rustup targets downloaded by cargo-bisect-rustc)

3bcda48, bors merge before LLVM 6:

$ cargo +ci-3bcda48a30b21e46b81a7989deb30a3ba85fb918-x86_64-apple-darwin run --release
...
decode                  time:   [1.5778 ms 1.5933 ms 1.6081 ms]
...

39abcc0:

$ cargo +ci-39abcc04139a0fd24422f422271849dc91e39a88-x86_64-apple-darwin run --release
...
decode                  time:   [1.9914 ms 1.9997 ms 2.0083 ms]

Current nightly:

$ cargo +nightly run --release
...
decode                  time:   [1.9383 ms 1.9466 ms 1.9555 ms]
...

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.WG-llvmWorking group: LLVM backend code generation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions