Skip to content

Significant performance regression on the encoding benchmark #69197

Closed
@ecstatic-morse

Description

@ecstatic-morse
Contributor

#69144 (a rollup) slowed down check builds of the encoding benchmark considerably, see the task-clock measurements. This degradation has been consistent over the last half-dozen perf runs, so it is not spurious. The following candidates have non-trivial changes to the parts of the compiler that are run during a check build.

I doubt it is #68938 or #69126 so cc @Centril @cjgillot

Activity

added
I-compiletimeIssue: Problems and improvements with respect to compile times.
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Feb 15, 2020
Centril

Centril commented on Feb 15, 2020

@Centril
Contributor

#69057 is mostly a pure refactoring so it seems unlikely?

Centril

Centril commented on Feb 15, 2020

@Centril
Contributor

Besides changes in https://github.com/rust-lang/rust/pull/68728/files#diff-f5c049612f32b4eda9adb5019ab10a83, nothing pops out in the parsing PR either.

added a commit that references this issue on Feb 15, 2020

Auto merge of #69199 - ecstatic-morse:revert-69108, r=<try>

ecstatic-morse

ecstatic-morse commented on Feb 16, 2020

@ecstatic-morse
ContributorAuthor

Ruled out #69108 via perf results from #69199, so it's likely the big one (#68728) cc @Centril @petrochenkov.

ecstatic-morse

ecstatic-morse commented on Feb 17, 2020

@ecstatic-morse
ContributorAuthor

Some perf builds around the regression were stuck in the queue when I posted this, so it may not be #69144. The regression occurs in early_lint_checks.

pnkfelix

pnkfelix commented on Feb 20, 2020

@pnkfelix
Member

nominating for discussion at T-compiler meeting for prioritization.

pnkfelix

pnkfelix commented on Feb 20, 2020

@pnkfelix
Member

discussed at T-compiler meeting. P-high. Removing nomination.

ecstatic-morse

ecstatic-morse commented on Feb 26, 2020

@ecstatic-morse
ContributorAuthor

A significant portion of the runtime for check builds of encoding is spent doing system calls (around 20% on the latest nightly). I believe this is because error messages are written directly to io::Stderr which does not buffer, which is supported by the perf results in #69227. Although there's a lot of variance, older nightlies appear to spend less time doing system calls than current ones, which could suggest that changes to diagnostics or diagnostics reporting could be the root cause of this issue.

Roughly the same number of errors are reported in old (end of 2019) nightlies as recent ones (~1900 lines output to stderr). However, earlier nightlies use many more calls to write(2, ...) to accomplish this (3500 vs 720). Given this, I would assume that the earlier nightlies would be slower than the current ones on the encoding benchmark, not faster. Perhaps someone else is more knowledgeable.

6 remaining items

Loading
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

    I-compiletimeIssue: Problems and improvements with respect to compile times.P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @pnkfelix@Centril@mati865@jonas-schievink@ecstatic-morse

        Issue actions

          Significant performance regression on the `encoding` benchmark · Issue #69197 · rust-lang/rust