Skip to content

How to ensure that my pull request will not break performance? #64

Closed

Description

@dzmitry-lahoda

I have made changes for one of story. But not sure if that case, may be not so often, #59, will do degrade performance? May be some step by step guide.

Activity

  1. dadhi commented on Mar 10, 2018

    @dadhi
    Owner

    Good question.

    • For now you can write the benchmark with BenchmarkDotNet in ..Benchmarks project.
    • Ensure the benchmarked case covers affected code path.
    • Create benchmark against normal Expression.Compile, and compare both compilation and delegate invocation. Save bm results.
    • Change code and repeat bm, compare new and old results.
  2. dadhi commented on Aug 31, 2018

    @dadhi
    Owner

    Another idea from #115 discussion.

    • We may CompileFast the test delegate,
    • then decompile it to IL code
    • then use this IL to emit and CreateDelegate to get a minimal possible time (assuming singe threaded liniar compilation)
    • Compare the original and minimal compilation time so that the delta fits, e.g. 10%
  3. dadhi commented on Mar 3, 2025

    @dadhi
    Owner
  4. jogibear9988 commented on Oct 24, 2026

    @jogibear9988
    Contributor

    Opened draft PR #564: #564

    It automates the before/after comparison requested here: exact PR base versus head, the same frozen BenchmarkDotNet workloads for both, Standard and LightExpression, compilation and warmed execution, tree construction, compilation plus first invocation (to account for deferred JIT), and managed allocations. It runs both revision orders on one runner and uploads the complete measurement artifacts.

    A separate trusted publisher posts the report on each PR. Reports for older head commits are marked Outdated and collapsed; reruns of the same head update its report. Fork benchmark jobs remain read-only, while the publisher validates data without executing PR code or artifact scripts.

    The initial phase is reporting only so we can observe hosted-runner variation before making regressions required checks. Local opt-in blocking policy and tests are included. The minimal-IL theoretical comparison discussed above is a separate experiment and is not implemented here. Automatic publishing starts once the publisher workflow is merged into master.

  5. dadhi commented on Oct 25, 2026

    @dadhi
    Owner

    closed by #564

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions