From c3bed14ed24b23c2f6f4cbfbb52416d802590875 Mon Sep 17 00:00:00 2001 From: Petr Date: Thu, 4 Jan 2024 10:43:35 +0100 Subject: [PATCH 1/7] solution (#16483) --- FSharp.Benchmarks.sln | 127 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 FSharp.Benchmarks.sln diff --git a/FSharp.Benchmarks.sln b/FSharp.Benchmarks.sln new file mode 100644 index 00000000000..04af0d6830d --- /dev/null +++ b/FSharp.Benchmarks.sln @@ -0,0 +1,127 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.1.32113.165 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MicroPerfCSharp", "tests\benchmarks\CompiledCodeBenchmarks\MicroPerf\CS\MicroPerfCSharp.csproj", "{CA98804B-E371-45AB-814F-AC4996579B6F}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Service", "src\Compiler\FSharp.Compiler.Service.fsproj", "{9B4528F6-8883-475C-AAF0-4F646233D30A}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Core", "src\FSharp.Core\FSharp.Core.fsproj", "{ADB51E6C-2D63-4AB1-9F2C-8E869FEFD170}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.DependencyManager.Nuget", "src\FSharp.DependencyManager.Nuget\FSharp.DependencyManager.Nuget.fsproj", "{9B98A267-BE47-4711-A1B6-98F3F321E3DD}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "MicroPerf", "tests\benchmarks\CompiledCodeBenchmarks\MicroPerf\MicroPerf.fsproj", "{ED766F38-BD2B-436B-AF73-7BE6FAE061DD}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "TaskPerf", "tests\benchmarks\CompiledCodeBenchmarks\TaskPerf\TaskPerf\TaskPerf.fsproj", "{4779C245-9B85-4491-85EB-B0AF6D818E81}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TaskPerfCSharp", "tests\benchmarks\CompiledCodeBenchmarks\TaskPerf\TaskPerfCSharp\TaskPerfCSharp.csproj", "{38CAA9B6-E4B8-42CB-B4E3-C2DC7D481913}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "HistoricalBenchmark", "tests\benchmarks\FCSBenchmarks\BenchmarkComparison\HistoricalBenchmark.fsproj", "{66E23120-5E94-49AE-A263-24583007F5F5}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "HistoricalBenchmark.Runner", "tests\benchmarks\FCSBenchmarks\BenchmarkComparison\HistoricalBenchmark.Runner\HistoricalBenchmark.Runner.fsproj", "{2A1289B1-1539-48CB-BE03-807FE4BC0387}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Benchmarks", "tests\benchmarks\FCSBenchmarks\CompilerServiceBenchmarks\FSharp.Compiler.Benchmarks.fsproj", "{50D1ECF3-DF38-4A8E-AC3B-2AF1E63263B8}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FCSSourceFiles", "tests\benchmarks\FCSBenchmarks\FCSSourceFiles\FCSSourceFiles.fsproj", "{0E2A7B27-3AD3-4C1D-BA0D-008A1200946F}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fsharp.ProfilingStartpointProject", "tests\benchmarks\Fsharp.ProfilingStartpointProject\Fsharp.ProfilingStartpointProject.fsproj", "{9F27346B-2FC6-4FD5-A932-4E80F331E6D6}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Test.Utilities", "tests\FSharp.Test.Utilities\FSharp.Test.Utilities.fsproj", "{0B149238-0912-493E-8877-F831AE01B942}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + ReleaseCompressed|Any CPU = ReleaseCompressed|Any CPU + Proto|Any CPU = Proto|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CA98804B-E371-45AB-814F-AC4996579B6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CA98804B-E371-45AB-814F-AC4996579B6F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CA98804B-E371-45AB-814F-AC4996579B6F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CA98804B-E371-45AB-814F-AC4996579B6F}.Release|Any CPU.Build.0 = Release|Any CPU + {CA98804B-E371-45AB-814F-AC4996579B6F}.ReleaseCompressed|Any CPU.ActiveCfg = Debug|Any CPU + {CA98804B-E371-45AB-814F-AC4996579B6F}.Proto|Any CPU.ActiveCfg = Debug|Any CPU + {9B4528F6-8883-475C-AAF0-4F646233D30A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B4528F6-8883-475C-AAF0-4F646233D30A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9B4528F6-8883-475C-AAF0-4F646233D30A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9B4528F6-8883-475C-AAF0-4F646233D30A}.Release|Any CPU.Build.0 = Release|Any CPU + {9B4528F6-8883-475C-AAF0-4F646233D30A}.ReleaseCompressed|Any CPU.ActiveCfg = ReleaseCompressed|Any CPU + {9B4528F6-8883-475C-AAF0-4F646233D30A}.ReleaseCompressed|Any CPU.Build.0 = ReleaseCompressed|Any CPU + {9B4528F6-8883-475C-AAF0-4F646233D30A}.Proto|Any CPU.ActiveCfg = Debug|Any CPU + {ADB51E6C-2D63-4AB1-9F2C-8E869FEFD170}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ADB51E6C-2D63-4AB1-9F2C-8E869FEFD170}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ADB51E6C-2D63-4AB1-9F2C-8E869FEFD170}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ADB51E6C-2D63-4AB1-9F2C-8E869FEFD170}.Release|Any CPU.Build.0 = Release|Any CPU + {ADB51E6C-2D63-4AB1-9F2C-8E869FEFD170}.ReleaseCompressed|Any CPU.ActiveCfg = ReleaseCompressed|Any CPU + {ADB51E6C-2D63-4AB1-9F2C-8E869FEFD170}.ReleaseCompressed|Any CPU.Build.0 = ReleaseCompressed|Any CPU + {ADB51E6C-2D63-4AB1-9F2C-8E869FEFD170}.Proto|Any CPU.ActiveCfg = Proto|Any CPU + {ADB51E6C-2D63-4AB1-9F2C-8E869FEFD170}.Proto|Any CPU.Build.0 = Proto|Any CPU + {9B98A267-BE47-4711-A1B6-98F3F321E3DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B98A267-BE47-4711-A1B6-98F3F321E3DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9B98A267-BE47-4711-A1B6-98F3F321E3DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9B98A267-BE47-4711-A1B6-98F3F321E3DD}.Release|Any CPU.Build.0 = Release|Any CPU + {9B98A267-BE47-4711-A1B6-98F3F321E3DD}.ReleaseCompressed|Any CPU.ActiveCfg = ReleaseCompressed|Any CPU + {9B98A267-BE47-4711-A1B6-98F3F321E3DD}.ReleaseCompressed|Any CPU.Build.0 = ReleaseCompressed|Any CPU + {9B98A267-BE47-4711-A1B6-98F3F321E3DD}.Proto|Any CPU.ActiveCfg = Debug|Any CPU + {ED766F38-BD2B-436B-AF73-7BE6FAE061DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ED766F38-BD2B-436B-AF73-7BE6FAE061DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ED766F38-BD2B-436B-AF73-7BE6FAE061DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ED766F38-BD2B-436B-AF73-7BE6FAE061DD}.Release|Any CPU.Build.0 = Release|Any CPU + {ED766F38-BD2B-436B-AF73-7BE6FAE061DD}.ReleaseCompressed|Any CPU.ActiveCfg = Debug|Any CPU + {ED766F38-BD2B-436B-AF73-7BE6FAE061DD}.Proto|Any CPU.ActiveCfg = Debug|Any CPU + {4779C245-9B85-4491-85EB-B0AF6D818E81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4779C245-9B85-4491-85EB-B0AF6D818E81}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4779C245-9B85-4491-85EB-B0AF6D818E81}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4779C245-9B85-4491-85EB-B0AF6D818E81}.Release|Any CPU.Build.0 = Release|Any CPU + {4779C245-9B85-4491-85EB-B0AF6D818E81}.ReleaseCompressed|Any CPU.ActiveCfg = Debug|Any CPU + {4779C245-9B85-4491-85EB-B0AF6D818E81}.Proto|Any CPU.ActiveCfg = Debug|Any CPU + {38CAA9B6-E4B8-42CB-B4E3-C2DC7D481913}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {38CAA9B6-E4B8-42CB-B4E3-C2DC7D481913}.Debug|Any CPU.Build.0 = Debug|Any CPU + {38CAA9B6-E4B8-42CB-B4E3-C2DC7D481913}.Release|Any CPU.ActiveCfg = Release|Any CPU + {38CAA9B6-E4B8-42CB-B4E3-C2DC7D481913}.Release|Any CPU.Build.0 = Release|Any CPU + {38CAA9B6-E4B8-42CB-B4E3-C2DC7D481913}.ReleaseCompressed|Any CPU.ActiveCfg = Debug|Any CPU + {38CAA9B6-E4B8-42CB-B4E3-C2DC7D481913}.Proto|Any CPU.ActiveCfg = Debug|Any CPU + {66E23120-5E94-49AE-A263-24583007F5F5}.Debug|Any CPU.ActiveCfg = Release|Any CPU + {66E23120-5E94-49AE-A263-24583007F5F5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {66E23120-5E94-49AE-A263-24583007F5F5}.Release|Any CPU.Build.0 = Release|Any CPU + {66E23120-5E94-49AE-A263-24583007F5F5}.ReleaseCompressed|Any CPU.ActiveCfg = Release|Any CPU + {66E23120-5E94-49AE-A263-24583007F5F5}.Proto|Any CPU.ActiveCfg = Release|Any CPU + {2A1289B1-1539-48CB-BE03-807FE4BC0387}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2A1289B1-1539-48CB-BE03-807FE4BC0387}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2A1289B1-1539-48CB-BE03-807FE4BC0387}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2A1289B1-1539-48CB-BE03-807FE4BC0387}.Release|Any CPU.Build.0 = Release|Any CPU + {2A1289B1-1539-48CB-BE03-807FE4BC0387}.ReleaseCompressed|Any CPU.ActiveCfg = Debug|Any CPU + {2A1289B1-1539-48CB-BE03-807FE4BC0387}.Proto|Any CPU.ActiveCfg = Debug|Any CPU + {50D1ECF3-DF38-4A8E-AC3B-2AF1E63263B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {50D1ECF3-DF38-4A8E-AC3B-2AF1E63263B8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {50D1ECF3-DF38-4A8E-AC3B-2AF1E63263B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {50D1ECF3-DF38-4A8E-AC3B-2AF1E63263B8}.Release|Any CPU.Build.0 = Release|Any CPU + {50D1ECF3-DF38-4A8E-AC3B-2AF1E63263B8}.ReleaseCompressed|Any CPU.ActiveCfg = Debug|Any CPU + {50D1ECF3-DF38-4A8E-AC3B-2AF1E63263B8}.Proto|Any CPU.ActiveCfg = Debug|Any CPU + {0E2A7B27-3AD3-4C1D-BA0D-008A1200946F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E2A7B27-3AD3-4C1D-BA0D-008A1200946F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E2A7B27-3AD3-4C1D-BA0D-008A1200946F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E2A7B27-3AD3-4C1D-BA0D-008A1200946F}.Release|Any CPU.Build.0 = Release|Any CPU + {0E2A7B27-3AD3-4C1D-BA0D-008A1200946F}.ReleaseCompressed|Any CPU.ActiveCfg = Debug|Any CPU + {0E2A7B27-3AD3-4C1D-BA0D-008A1200946F}.Proto|Any CPU.ActiveCfg = Debug|Any CPU + {9F27346B-2FC6-4FD5-A932-4E80F331E6D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F27346B-2FC6-4FD5-A932-4E80F331E6D6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F27346B-2FC6-4FD5-A932-4E80F331E6D6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F27346B-2FC6-4FD5-A932-4E80F331E6D6}.Release|Any CPU.Build.0 = Release|Any CPU + {9F27346B-2FC6-4FD5-A932-4E80F331E6D6}.ReleaseCompressed|Any CPU.ActiveCfg = Debug|Any CPU + {9F27346B-2FC6-4FD5-A932-4E80F331E6D6}.Proto|Any CPU.ActiveCfg = Debug|Any CPU + {0B149238-0912-493E-8877-F831AE01B942}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0B149238-0912-493E-8877-F831AE01B942}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0B149238-0912-493E-8877-F831AE01B942}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0B149238-0912-493E-8877-F831AE01B942}.Release|Any CPU.Build.0 = Release|Any CPU + {0B149238-0912-493E-8877-F831AE01B942}.ReleaseCompressed|Any CPU.ActiveCfg = Debug|Any CPU + {0B149238-0912-493E-8877-F831AE01B942}.Proto|Any CPU.ActiveCfg = Debug|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6D8EE73F-B214-462F-8774-84EF625EA6E4} + EndGlobalSection +EndGlobal From f7265bb3fe3d55fdbb3a7b2a28bf844534736109 Mon Sep 17 00:00:00 2001 From: Petr Date: Thu, 4 Jan 2024 10:43:54 +0100 Subject: [PATCH 2/7] Facelifting FCS benchmarks (#16484) * Facelifting FCS benchmarks * Update FSharp.Compiler.Benchmarks.fsproj --- .../BenchmarkComparison/HistoricalBenchmark.fsproj | 7 ------- .../FCSBenchmarks/CompilerServiceBenchmarks/Benchmarks.fs | 1 - .../CompilerServiceBenchmarks.fs | 6 +++--- .../FSharp.Compiler.Benchmarks.fsproj | 8 -------- .../CompilerServiceBenchmarks/FileCascadeBenchmarks.fs | 2 +- .../FCSBenchmarks/FCSSourceFiles/FCSSourceFiles.fsproj | 1 + tests/benchmarks/FCSBenchmarks/FCSSourceFiles/Program.fs | 7 +++---- 7 files changed, 8 insertions(+), 24 deletions(-) delete mode 100644 tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/Benchmarks.fs diff --git a/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/HistoricalBenchmark.fsproj b/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/HistoricalBenchmark.fsproj index a477f61af81..2534ba292b5 100644 --- a/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/HistoricalBenchmark.fsproj +++ b/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/HistoricalBenchmark.fsproj @@ -5,13 +5,6 @@ net8.0 true Release - - $(NoWarn);NU1505 diff --git a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/Benchmarks.fs b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/Benchmarks.fs deleted file mode 100644 index 5f282702bb0..00000000000 --- a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/Benchmarks.fs +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fs b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fs index 679989520c2..4910b2e19eb 100644 --- a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fs +++ b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fs @@ -124,13 +124,13 @@ type CompilerServiceBenchmarks() = |> Some [] - member _.ParsingTypeCheckerFs() = + member _.ParsingCheckExpressionsFs() = let config = getConfig() let results = config.Checker.ParseFile("CheckExpressions.fs", config.Source |> SourceText.toFSharpSourceText, parsingOptions) |> Async.RunSynchronously if results.ParseHadErrors then failwithf $"parse had errors: %A{results.Diagnostics}" - [] - member _.ParsingTypeCheckerFsSetup() = + [] + member _.ParsingCheckExpressionsFsSetup() = let checker = getConfig().Checker checker.InvalidateAll() checker.ClearLanguageServiceRootCachesAndCollectAndFinalizeAllTransients() diff --git a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FSharp.Compiler.Benchmarks.fsproj b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FSharp.Compiler.Benchmarks.fsproj index a8c8ff31bc6..19c7f7a7e96 100644 --- a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FSharp.Compiler.Benchmarks.fsproj +++ b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FSharp.Compiler.Benchmarks.fsproj @@ -4,13 +4,6 @@ Exe net8.0 true - - $(NoWarn);NU1505 false @@ -26,7 +19,6 @@ - diff --git a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FileCascadeBenchmarks.fs b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FileCascadeBenchmarks.fs index 17822adeb96..686153577fa 100644 --- a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FileCascadeBenchmarks.fs +++ b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FileCascadeBenchmarks.fs @@ -68,7 +68,7 @@ let processFunc{number} (x) (func:MyFunctionType{number}) = }} //$COMMENTAREA$""" -/// Code create using FSharpCheckFileResults.GenerateSignature() +/// Code created using FSharpCheckFileResults.GenerateSignature() let generateFsi number = $""" module Benchmark{number} diff --git a/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/FCSSourceFiles.fsproj b/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/FCSSourceFiles.fsproj index 5f0d38af2ef..3774aa87023 100644 --- a/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/FCSSourceFiles.fsproj +++ b/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/FCSSourceFiles.fsproj @@ -3,6 +3,7 @@ Exe net8.0 + true diff --git a/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/Program.fs b/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/Program.fs index 136897e081b..9c8148ed4da 100644 --- a/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/Program.fs +++ b/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/Program.fs @@ -270,7 +270,7 @@ module Project = OriginalLoadReferences = [] Stamp = None } - FSharpReferencedProject.CreateFSharp( + FSharpReferencedProject.FSharpReference( __SOURCE_DIRECTORY__ + @"\..\..\..\..\artifacts\bin\FSharp.Core\Debug\netstandard2.1\FSharp.Core.dll", projectOptions ) @@ -459,7 +459,7 @@ module Project = OriginalLoadReferences = [] Stamp = None } - FSharpReferencedProject.CreateFSharp( + FSharpReferencedProject.FSharpReference( __SOURCE_DIRECTORY__ + @"\..\..\..\..\artifacts\bin\FSharp.DependencyManager.Nuget\Debug\netstandard2.0\FSharp.DependencyManager.Nuget.dll", projectOptions ) @@ -890,8 +890,7 @@ type CompilerService() = | None -> sourceOpt <- projectOptions.SourceFiles - |> Array.filter (fun filePath -> filePath.EndsWith("CheckDeclarations.fs")) // || filePath.EndsWith("CheckExpressions.fs")) - // || filePath.EndsWith("lex.fs") || filePath.EndsWith("pars.fs")) + |> Array.filter (fun filePath -> filePath.EndsWith("CheckDeclarations.fs")) |> Array.map (fun filePath -> filePath, SourceText.ofString (File.ReadAllText(filePath))) |> Some | _ -> () From 8f67320459c5e240439aff7f56844d310fbe3c1e Mon Sep 17 00:00:00 2001 From: Petr Date: Thu, 4 Jan 2024 10:44:10 +0100 Subject: [PATCH 3/7] Facelifting compiled code benchmarks (#16485) --- .../CompiledCodeBenchmarks/MicroPerf/Async.fs | 2 +- .../MicroPerf/Benchmarks.fs | 11 ++--------- .../MicroPerf/CS/MicroPerfCSharp.cs | 2 +- .../MicroPerf/Collections.fs | 6 +----- .../MicroPerf/MicroPerf.fsproj | 15 +-------------- .../TaskPerf/TaskPerf/TaskPerf.fs | 8 -------- .../TaskPerf/TaskPerf/TaskPerf.fsproj | 17 +---------------- .../TaskPerfCSharp/TaskPerfCSharp.csproj | 4 ++-- 8 files changed, 9 insertions(+), 56 deletions(-) diff --git a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/Async.fs b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/Async.fs index 704b0723c94..4e7028e692e 100644 --- a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/Async.fs +++ b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/Async.fs @@ -8,7 +8,7 @@ open BenchmarkDotNet.Attributes [] type AsyncWhileMemoryBench() = - [] + [] member val Length = 0 with get, set [] diff --git a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/Benchmarks.fs b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/Benchmarks.fs index 366efa97439..a081437e1f0 100644 --- a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/Benchmarks.fs +++ b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/Benchmarks.fs @@ -1,8 +1,3 @@ -(* -msbuild tests\fsharp\perf\tasks\FS\TaskPerf.fsproj /p:Configuration=Release -dotnet artifacts\bin\TaskPerf\Release\netcoreapp2.1\TaskPerf.dll -*) - namespace TaskPerf open BenchmarkDotNet.Running @@ -10,9 +5,7 @@ open BenchmarkDotNet.Running module Main = [] - let main argv = + let main _ = printfn "Running benchmarks..." - //let results = BenchmarkRunner.Run() - //let results = BenchmarkRunner.Run() - let results = BenchmarkRunner.Run() + let _ = BenchmarkRunner.Run() 0 diff --git a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/CS/MicroPerfCSharp.cs b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/CS/MicroPerfCSharp.cs index 409ed07ac55..93d5833555d 100644 --- a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/CS/MicroPerfCSharp.cs +++ b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/CS/MicroPerfCSharp.cs @@ -4,7 +4,7 @@ public class MicroPerfCSharp { // - // FSharp will not inline the code so we shouldn't eiter. + // FSharp will not inline the code so we shouldn't either. // [MethodImpl(MethodImplOptions.NoInlining)] public static int Cond(int x) diff --git a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/Collections.fs b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/Collections.fs index 1fdacc37fd9..fa6178e6778 100644 --- a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/Collections.fs +++ b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/Collections.fs @@ -1,10 +1,6 @@ module Collections open BenchmarkDotNet.Attributes -open BenchmarkDotNet.Running -open BenchmarkDotNet.Configs -open BenchmarkDotNet.Diagnosers -open System.Runtime.CompilerServices [] [] @@ -15,7 +11,7 @@ type CollectionsBenchmark() = let mutable list = [] let mutable array = [||] - [] + [] member this.Length with get () = length and set (value) = diff --git a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/MicroPerf.fsproj b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/MicroPerf.fsproj index 81866aa5676..919c4cc073c 100644 --- a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/MicroPerf.fsproj +++ b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/MicroPerf.fsproj @@ -2,13 +2,6 @@ net8.0 Exe - - $(NoWarn);NU1505 true $(OtherFlags) --nowarn:1204 @@ -16,13 +9,6 @@ $(OtherFlags) --nowarn:57 $(OtherFlags) --langversion:preview $(OtherFlags) --define:PREVIEW - - - @@ -30,6 +16,7 @@ + diff --git a/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerf/TaskPerf.fs b/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerf/TaskPerf.fs index 7f03c4d636b..6f89f4fd6eb 100644 --- a/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerf/TaskPerf.fs +++ b/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerf/TaskPerf.fs @@ -1,19 +1,11 @@ -(* -msbuild tests\benchmarks\CompiledCodeBenchmarks\TaskPerf\TaskPerf\TaskPerf.fsproj /p:Configuration=Release -dotnet artifacts\bin\TaskPerf\Release\net7.0\TaskPerf.dll -*) - namespace TaskPerf -//open FSharp.Control.Tasks open System -open System.Diagnostics open System.Threading.Tasks open System.IO open BenchmarkDotNet.Attributes open BenchmarkDotNet.Running open TaskBuilderTasks //.ContextSensitive // TaskBuilder.fs extension members -//open FSharp.Control.ContextSensitiveTasks // the default open FSharp.Control // AsyncSeq open Tests.SyncBuilder open BenchmarkDotNet.Configs diff --git a/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerf/TaskPerf.fsproj b/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerf/TaskPerf.fsproj index 4d29d42c536..9706167ff62 100644 --- a/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerf/TaskPerf.fsproj +++ b/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerf/TaskPerf.fsproj @@ -3,13 +3,6 @@ net8.0 Exe - - NU1505 true $(OtherFlags) --nowarn:1204 @@ -23,9 +16,6 @@ - @@ -37,14 +27,9 @@ - - - - + diff --git a/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerfCSharp/TaskPerfCSharp.csproj b/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerfCSharp/TaskPerfCSharp.csproj index 323d4d5ce6f..a4e2d968480 100644 --- a/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerfCSharp/TaskPerfCSharp.csproj +++ b/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerfCSharp/TaskPerfCSharp.csproj @@ -1,13 +1,13 @@  - net7.0 + net8.0 Library 8.0 - + From 0cca68638812e8835d3e483dd0c0d3e4a4b396d7 Mon Sep 17 00:00:00 2001 From: Petr Date: Fri, 5 Jan 2024 16:32:24 +0100 Subject: [PATCH 4/7] Removing a dead bench notebook (#16496) --- .../benchmarks.ipynb | 117 ------------------ 1 file changed, 117 deletions(-) delete mode 100644 tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/benchmarks.ipynb diff --git a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/benchmarks.ipynb b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/benchmarks.ipynb deleted file mode 100644 index 5fae6333c77..00000000000 --- a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/benchmarks.ipynb +++ /dev/null @@ -1,117 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "dotnet_interactive": { - "language": "pwsh" - }, - "vscode": { - "languageId": "polyglot-notebook" - } - }, - "outputs": [], - "source": [ - "#!pwsh\n", - "dotnet build -c release\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "dotnet_interactive": { - "language": "fsharp" - }, - "vscode": { - "languageId": "polyglot-notebook" - } - }, - "outputs": [], - "source": [ - "#r \"../../../artifacts/bin/FSharp.Compiler.Benchmarks/Release/net8.0/FSharp.Compiler.Benchmarks.dll\"\n", - "#r \"../../../artifacts/bin/FSharp.Compiler.Benchmarks/Release/net8.0/BenchmarkDotNet.dll\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "dotnet_interactive": { - "language": "fsharp" - }, - "vscode": { - "languageId": "polyglot-notebook" - } - }, - "outputs": [], - "source": [ - "open BenchmarkDotNet.Running\n", - "open FSharp.Compiler.Benchmarks\n", - "\n", - "let summary = BenchmarkRunner.Run()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "dotnet_interactive": { - "language": "fsharp" - }, - "vscode": { - "languageId": "polyglot-notebook" - } - }, - "outputs": [], - "source": [ - "// https://benchmarkdotnet.org/api/BenchmarkDotNet.Reports.BenchmarkReport.html\n", - "#r \"nuget: XPlot.Plotly.Interactive, 4.0.2\"\n", - "\n", - "open XPlot.Plotly\n", - "\n", - "let gcStats = summary.Reports |> Seq.map (fun x -> x.GcStats)\n", - "\n", - "let gen0Series =\n", - " Bar(\n", - " name = \"Gen 0\",\n", - " y = (gcStats |> Seq.map (fun x -> x.Gen0Collections))\n", - " )\n", - "\n", - "let gen1Series =\n", - " Bar(\n", - " name = \"Gen 1\",\n", - " y = (gcStats |> Seq.map (fun x -> x.Gen1Collections))\n", - " )\n", - "\n", - "let gen2Series =\n", - " Bar(\n", - " name = \"Gen 2\",\n", - " y = (gcStats |> Seq.map (fun x -> x.Gen2Collections))\n", - " )\n", - "\n", - "[gen0Series;gen1Series;gen2Series]\n", - "|> Chart.Plot\n", - "|> Chart.WithTitle(\"F# Type-Checking Benchmark 1 - GC Collection Counts\")" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": ".NET (C#)", - "language": "C#", - "name": ".net-csharp" - }, - "language_info": { - "file_extension": ".cs", - "mimetype": "text/x-csharp", - "name": "C#", - "pygments_lexer": "csharp", - "version": "9.0" - }, - "orig_nbformat": 4 - }, - "nbformat": 4, - "nbformat_minor": 2 -} From 685dbf0a097eb53e0a269382b176288ce8e33da2 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Fri, 5 Jan 2024 16:32:49 +0100 Subject: [PATCH 5/7] Remove duplicated nuget feeds (#16488) RestoreSources don't need to be specified in msbuild as they are already provided by the repo's NuGet.config file. Also, encrypted feeds only work with NuGet.config and not with restore sources specified via msbuild. Other arcade-ified repositories don't do this and hence I'm relatively certain that this is code path isn't active anymore. --- eng/Versions.props | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index b99935c8056..598487cde55 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -77,21 +77,6 @@ - - - $(RestoreSources); - https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json; - https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk/nuget/v3/index.json; - https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-impl/nuget/v3/index.json; - https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json; - https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json; - https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json; - https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json; - https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8-transport/nuget/v3/index.json; - https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json; - https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk-archived/nuget/v3/index.json; - https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-impl-archived/nuget/v3/index.json; - From 77bb0155365952c53f451983404db88cbf267c7e Mon Sep 17 00:00:00 2001 From: Petr Date: Fri, 5 Jan 2024 16:33:16 +0100 Subject: [PATCH 6/7] Remove the obsolete NuGet hack (#16491) --- .../Microsoft.FSharp.Compiler.fsproj | 7 ------- src/fsc/fsc.targets | 8 -------- src/fsi/fsi.targets | 7 ------- .../FSharp.Compiler.Service.Tests.fsproj | 7 ------- 4 files changed, 29 deletions(-) diff --git a/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.fsproj b/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.fsproj index f7560b70738..a427f7006dd 100644 --- a/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.fsproj +++ b/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.fsproj @@ -9,13 +9,6 @@ .NET Core compatible version of the F# compiler fsc.exe. /blob/main/release-notes.md#FSharp-Tools-$(FSProductVersionReleaseNotesVersion) true - - $(NoWarn);NU1505 diff --git a/src/fsc/fsc.targets b/src/fsc/fsc.targets index 47d7ea87264..2973feb613e 100644 --- a/src/fsc/fsc.targets +++ b/src/fsc/fsc.targets @@ -4,14 +4,6 @@ Exe - - $(NoWarn);NU1505 - $(NoWarn);44 $(NoWarn);75 true diff --git a/src/fsi/fsi.targets b/src/fsi/fsi.targets index 4e8c6a6cbc3..2f38a20ecc3 100644 --- a/src/fsi/fsi.targets +++ b/src/fsi/fsi.targets @@ -4,13 +4,6 @@ Exe - - $(NoWarn);NU1505 $(NoWarn);44 true $(OtherFlags) --warnon:1182 diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj index 2eb2e1d954a..909402a2a61 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj @@ -5,13 +5,6 @@ Exe net472;net8.0 net8.0 - - $(NoWarn);NU1505 $(NoWarn);44;75; true false From 4887cd519ce115bfd06a0b76dc60acbd8076e92d Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 5 Jan 2024 16:44:10 +0100 Subject: [PATCH 7/7] [main] Update dependencies from dotnet/source-build-reference-packages (#16492) * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240103.1 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24052.1 -> To Version 9.0.0-alpha.1.24053.1 * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240103.1 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24052.1 -> To Version 9.0.0-alpha.1.24053.1 --------- Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3bc3d87f36a..d1718cc9356 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,9 +1,9 @@ - + https://github.com/dotnet/source-build-reference-packages - 5357f2bafb9e23858aa57136d38dbb113cdf81a2 + 5f670e45d060b25d5b07646dfcd94eae31893191