Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dzmitry-lahoda opened this issue Mar 10, 2018 · 2 comments
Open

Comments

@dzmitry-lahoda
Copy link
Contributor

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.

@dadhi
Copy link
Owner

dadhi commented Mar 10, 2018

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.

@dadhi
Copy link
Owner

dadhi commented Aug 31, 2018

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%

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

No branches or pull requests

2 participants