-
Notifications
You must be signed in to change notification settings - Fork 789
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
Reduce number of typeEquiv checks #10324
Conversation
Do we have some sort of benchmark suite to see if these changes are helpful? I'm planning to try finding opportunities for optimizations too and I wonder if I find one, I can be assured stuff I code really helps |
The closes thing we have is CompilerServiceBenchmarks: https://github.com/dotnet/fsharp/blob/main/tests/benchmarks/CompilerServiceBenchmarks/Program.fs We use benchmarkdotnet to experiment against a few different scenarios. It may need to be updated again now that some files have been rearranged. If the benchmark doesn't yield anything meaningful then that's fine though. Sometimes a single change is marginal but when you combine it with 3-4 other marginal changes it's no longer marginal. So long as it's obvious that there is less work being done in the code then we'd be inclined to take it. That said, the more evidence, the better! |
We've started on building up a benchmark suite here: dotnet/performance#1546. Some discussion might be helpful here to make sure that we're designing benchmarks that will be useful for historical comparison over time as code is refactored. |
@jonsequitur I've reported a non-fruitive exploration in #8260 about experience of compiling FSharpPlus library unit tests. The unit test codebase is arguably not representative of general F# codebase but it provides a very good test ground for overload resolution complexity and would very likely highlight performance regression in that logic. I don't know for sure if the F# compiler team sees that as salliant but it felt to me we should take a snapshot of that codebase and use it as a benchmark. If you feel it may have relevance for dotnet/performance#1546 I'll pay a closer look at that repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this.
Co-authored-by: Steffen Forkmann <[email protected]>
Co-authored-by: Steffen Forkmann <[email protected]>
…ne on parameters (#6811) * Move existing Compiler.ComponentTests to a new Compiler.fs framework (#9839) (#9847) * Move existing Compiler.ComponentTests to a new Compiler.fs framework; Add 'parse' function * Changed some wording in error messages Co-authored-by: Vlad Zarytovskii <[email protected]> * fix build * fix order of diagnostics * update baselines * Delete FSharp.Compiler.Service.fsproj * fix comments * fix comments * fix build * fix build * Reduce number of typeEquiv checks (#10324) (#10374) Co-authored-by: Steffen Forkmann <[email protected]> * xlf * fix build * fix build * fix build * fix build * fix list and array builder perf * better perf testing * better perf testing * better perf testing * update baselines * work on taskSeq { ... } * remove old file * enable all benchmarks * update benchmarks * update baseline * static checking of resumable code * static checking of resumable code * fix build * fix build * fix build * fix build * fix build * fix build * fix baseline * try fix stack overflow * fix up tests * add some negative testing, simplify implementation * fix up tests * fix baseline * fix test and add negative baselines * rename intrinsic and add test for seq case * fix build * fix and rename test * fix test * improve debugging * improve debugging of try/with and try/finally * fix baseline * infer resumable code from single attribute on delegate type * update samples * inline if lambda * update baselines * fix check * delegate and computed function reductions for inlined code * update baselines * update baselines * update test * fix test that failed randomly due to inexact floating point * add tests for generated IL * update tests * don't use InlineIfLambda on sumBy and averageBy due to slight floating point changes * add ability for struct machines to implement additional interfaces (needed for low allocation co-routines) * add coroutines * update baselines * resumable code combinators and tailcalls for coroutines * fix baselinhe * make tasks using shared resumable code combinators the default. Also testing and fixes for dynamic execution of resumable code * update baselines * suppress warning in FSharp.Core * suppress warning in FSharp.Core * fix build * fix build * fix build * update test * only struct state machines * codegen IResumableStateMachine * update baselines * update baselines * notes on sample * fix build * Update coroutine.fs * Negative testing following spec for compilability. Additional testing for dynamic implementation of tasks * simpler coroutine sample, fix build * update baselines * remove unused state vars from internal represenation of object expressions * add coroutine example * update perf benchmarks * remove old files * code cleanup * add compilergenerated attribute, add async2 approximate implementation * test async perf w.r.t. previous compiler, add test for reduced stack trace * using on IAsyncDisposable * remove dynamic Awaiter field from tasks * update surface area * add backgroundTask { ... } * surface area test only for decalred members etc. * fix test * add dynamic tests for backgroundTask * fix codegen bug * fix build * simplify SRTP use in task.fs/fsi * fix build and baselines * fix build * fix build * fix build * fix pacakge * remove RFC FS-1099 from this PR * remove RFC FS-1099 from this PR * backgroundTask only switches to background if necessary * Update tasks.fs * fix test * clear sync context for test * clear sync context for test * update baseline * code review * fix build * fix build * fix clearing state machines * fix to clearing code * improve generated task code and debugging * only update baselines on failure * fix some cases of debug stepping, improve isnull codegen, add more tests * move TaskPerf to benchmarks directory * fix baseline * only update baselines when things changed * fix baselines * update baselines * fix baselines * fix build * fix some tests, add hard error on language version check * reset unchanged files * update baselines * update baselines * fix baseline * fix comparer * flags * Revert "flags" This reverts commit 5b2a011. * fix merge * fix build * fix build * fix build * update baseline * fix build * fix build * update baseline * fix baselines * update baseline * fix build * fix build * update baseline * fix test * code review changes Co-authored-by: Kevin Ransom (msft) <[email protected]> Co-authored-by: Phillip Carter <[email protected]> Co-authored-by: dotnet bot <[email protected]> Co-authored-by: Vlad Zarytovskii <[email protected]> Co-authored-by: Don Syme <[email protected]> Co-authored-by: Steffen Forkmann <[email protected]> Co-authored-by: Brett V. Forsgren <[email protected]>
No description provided.