From e06da031528a6c71bef1f07d24e9fb3ec3857fa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=A4gi?= Date: Sun, 17 Aug 2025 21:21:17 +0200 Subject: [PATCH 1/4] reference newest BenchmarkDotNet --- .../Atmoos.Sphere.BenchmarkDotNet.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Atmoos.Sphere.BenchmarkDotNet/Atmoos.Sphere.BenchmarkDotNet.csproj b/source/Atmoos.Sphere.BenchmarkDotNet/Atmoos.Sphere.BenchmarkDotNet.csproj index 699b884..15e6f9e 100644 --- a/source/Atmoos.Sphere.BenchmarkDotNet/Atmoos.Sphere.BenchmarkDotNet.csproj +++ b/source/Atmoos.Sphere.BenchmarkDotNet/Atmoos.Sphere.BenchmarkDotNet.csproj @@ -10,7 +10,7 @@ - + From 1bf89838dd474b78a425839a2d64f2ce439ea618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=A4gi?= Date: Sun, 17 Aug 2025 21:24:21 +0200 Subject: [PATCH 2/4] reference newest GH actions --- .github/workflows/dotnet.yml | 2 +- .github/workflows/publish-library.yml | 4 ++-- .github/workflows/publish-new-library.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 9f63b08..36e0cc9 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -35,7 +35,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup .NET uses: actions/setup-dotnet@v4 with: diff --git a/.github/workflows/publish-library.yml b/.github/workflows/publish-library.yml index f039f0b..7e0274c 100644 --- a/.github/workflows/publish-library.yml +++ b/.github/workflows/publish-library.yml @@ -20,13 +20,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup .NET uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ env.DotNetVersion }} - name: Publish - uses: tedd/publish-nuget-neo@v1 + uses: tedd/publish-nuget-neo@v2 with: NUGET_KEY: ${{secrets.PUSH_NEW_SPHERE_VERSION}} PROJECT_FILE_PATH: ${{inputs.project-path}} diff --git a/.github/workflows/publish-new-library.yml b/.github/workflows/publish-new-library.yml index 3057e4c..6944cb3 100644 --- a/.github/workflows/publish-new-library.yml +++ b/.github/workflows/publish-new-library.yml @@ -20,13 +20,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup .NET uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ env.DotNetVersion }} - name: Publish - uses: tedd/publish-nuget-neo@v1 + uses: tedd/publish-nuget-neo@v2 with: NUGET_KEY: ${{secrets.CREATENEWNUGETPACKAGE}} PROJECT_FILE_PATH: ${{inputs.project-path}} From e0ec8838ab658757247d4d9480d501e9b0295853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=A4gi?= Date: Sun, 17 Aug 2025 21:26:30 +0200 Subject: [PATCH 3/4] bump version of benchmarking library --- .../Atmoos.Sphere.BenchmarkDotNet.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Atmoos.Sphere.BenchmarkDotNet/Atmoos.Sphere.BenchmarkDotNet.csproj b/source/Atmoos.Sphere.BenchmarkDotNet/Atmoos.Sphere.BenchmarkDotNet.csproj index 15e6f9e..23a2a3a 100644 --- a/source/Atmoos.Sphere.BenchmarkDotNet/Atmoos.Sphere.BenchmarkDotNet.csproj +++ b/source/Atmoos.Sphere.BenchmarkDotNet/Atmoos.Sphere.BenchmarkDotNet.csproj @@ -3,7 +3,7 @@ - 0.2.0 + 0.2.1 benchmark, benchmarking, export benchmark results Atmoos Sphere BenchmarkDotNet:Exports benchmark results into the defining benchmark source files. From d9fec7a8733faf25761f957c8f04ce3ded5ef335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=A4gi?= Date: Sun, 17 Aug 2025 21:42:54 +0200 Subject: [PATCH 4/4] Update benchmark statistics. --- .../Async/OrderByCompletionBenchmark.cs | 42 +++++++++---------- .../Sync/SynchronousAwaitBenchmark.cs | 12 +++--- .../Text/InsertFileBenchmark.cs | 16 +++---- .../Text/InsertStreamBenchmark.cs | 34 +++++++-------- 4 files changed, 52 insertions(+), 52 deletions(-) diff --git a/source/Atmoos.Sphere.Benchmark/Async/OrderByCompletionBenchmark.cs b/source/Atmoos.Sphere.Benchmark/Async/OrderByCompletionBenchmark.cs index f8889bf..911bcd9 100644 --- a/source/Atmoos.Sphere.Benchmark/Async/OrderByCompletionBenchmark.cs +++ b/source/Atmoos.Sphere.Benchmark/Async/OrderByCompletionBenchmark.cs @@ -56,29 +56,29 @@ static async Task Next(HashSet> set) /* Summary -BenchmarkDotNet v0.13.12, Arch Linux +BenchmarkDotNet v0.15.2, Linux Arch Linux Intel Core i7-8565U CPU 1.80GHz (Whiskey Lake), 1 CPU, 8 logical and 4 physical cores -.NET SDK 8.0.104 - [Host] : .NET 8.0.4 (8.0.424.16909), X64 RyuJIT AVX2 - Job-QJKLMT : .NET 8.0.4 (8.0.424.16909), X64 RyuJIT AVX2 +.NET SDK 9.0.109 + [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2 + Job-CNUJVU : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2 InvocationCount=1 UnrollFactor=1 -| Method | Count | Mean | Error | Ratio | Allocated | Alloc Ratio | -|------------------------ |------ |-----------:|--------:|------:|-----------:|------------:| -| Unordered | 128 | 257.4 ms | 1.55 ms | 1.00 | 1.33 KB | 0.04 | -| OrderedByCompletion | 128 | 257.3 ms | 1.42 ms | 1.00 | 31.63 KB | 1.00 | -| NaiveCompletionOrdering | 128 | 257.3 ms | 1.25 ms | 1.00 | 115.42 KB | 3.65 | -| | | | | | | | -| Unordered | 256 | 513.9 ms | 1.25 ms | 1.00 | 1.33 KB | 0.02 | -| OrderedByCompletion | 256 | 513.7 ms | 1.16 ms | 1.00 | 61.38 KB | 1.00 | -| NaiveCompletionOrdering | 256 | 513.8 ms | 1.03 ms | 1.00 | 361.45 KB | 5.89 | -| | | | | | | | -| Unordered | 512 | 1,023.3 ms | 0.81 ms | 1.00 | 1.33 KB | 0.01 | -| OrderedByCompletion | 512 | 1,023.4 ms | 0.62 ms | 1.00 | 121.13 KB | 1.00 | -| NaiveCompletionOrdering | 512 | 1,023.7 ms | 1.42 ms | 1.00 | 1233.38 KB | 10.18 | -| | | | | | | | -| Unordered | 1024 | 2,045.2 ms | 0.83 ms | 1.00 | 1.33 KB | 0.005 | -| OrderedByCompletion | 1024 | 2,045.5 ms | 2.98 ms | 1.00 | 241.76 KB | 1.000 | -| NaiveCompletionOrdering | 1024 | 2,047.0 ms | 1.83 ms | 1.00 | 4512.4 KB | 18.665 | +| Method | Count | Mean | Error | Ratio | Gen0 | Allocated | Alloc Ratio | +|------------------------ |------ |-----------:|--------:|------:|----------:|----------:|------------:| +| Unordered | 128 | 256.4 ms | 0.59 ms | 1.00 | - | 360 B | 0.01 | +| OrderedByCompletion | 128 | 255.8 ms | 0.76 ms | 1.00 | - | 31512 B | 1.00 | +| NaiveCompletionOrdering | 128 | 255.8 ms | 0.37 ms | 1.00 | - | 122568 B | 3.89 | +| | | | | | | | | +| Unordered | 256 | 512.3 ms | 0.89 ms | 1.00 | - | 336 B | 0.005 | +| OrderedByCompletion | 256 | 512.1 ms | 0.63 ms | 1.00 | - | 61696 B | 1.000 | +| NaiveCompletionOrdering | 256 | 512.1 ms | 0.76 ms | 1.00 | - | 362368 B | 5.873 | +| | | | | | | | | +| Unordered | 512 | 1,023.3 ms | 1.45 ms | 1.00 | - | 336 B | 0.003 | +| OrderedByCompletion | 512 | 1,023.7 ms | 0.73 ms | 1.00 | - | 123136 B | 1.000 | +| NaiveCompletionOrdering | 512 | 1,023.8 ms | 1.03 ms | 1.00 | - | 1247088 B | 10.128 | +| | | | | | | | | +| Unordered | 1024 | 2,048.0 ms | 1.92 ms | 1.00 | - | 336 B | 0.001 | +| OrderedByCompletion | 1024 | 2,047.0 ms | 3.71 ms | 1.00 | - | 246400 B | 1.000 | +| NaiveCompletionOrdering | 1024 | 2,046.9 ms | 2.02 ms | 1.00 | 1000.0000 | 4679128 B | 18.990 | Summary */ diff --git a/source/Atmoos.Sphere.Benchmark/Sync/SynchronousAwaitBenchmark.cs b/source/Atmoos.Sphere.Benchmark/Sync/SynchronousAwaitBenchmark.cs index c705611..e85fbf6 100644 --- a/source/Atmoos.Sphere.Benchmark/Sync/SynchronousAwaitBenchmark.cs +++ b/source/Atmoos.Sphere.Benchmark/Sync/SynchronousAwaitBenchmark.cs @@ -21,17 +21,17 @@ public class SynchronousAwaitBenchmark /* Summary -BenchmarkDotNet v0.13.12, Arch Linux +BenchmarkDotNet v0.15.2, Linux Arch Linux Intel Core i7-8565U CPU 1.80GHz (Whiskey Lake), 1 CPU, 8 logical and 4 physical cores -.NET SDK 8.0.104 - [Host] : .NET 8.0.4 (8.0.424.16909), X64 RyuJIT AVX2 - ShortRun : .NET 8.0.4 (8.0.424.16909), X64 RyuJIT AVX2 +.NET SDK 9.0.109 + [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2 + ShortRun : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2 Job=ShortRun IterationCount=9 LaunchCount=1 WarmupCount=5 | Method | Mean | Error | Ratio | Allocated | Alloc Ratio | |-------------------- |---------:|---------:|------:|----------:|------------:| -| AsyncAwaitTaskDelay | 63.86 ms | 0.248 ms | 1.00 | 464 B | 1.00 | -| SyncAwaitTaskDelay | 63.97 ms | 0.197 ms | 1.00 | 360 B | 0.78 | +| AsyncAwaitTaskDelay | 63.14 ms | 0.074 ms | 1.00 | 336 B | 1.00 | +| SyncAwaitTaskDelay | 63.19 ms | 0.147 ms | 1.00 | 232 B | 0.69 | Summary */ diff --git a/source/Atmoos.Sphere.Benchmark/Text/InsertFileBenchmark.cs b/source/Atmoos.Sphere.Benchmark/Text/InsertFileBenchmark.cs index 08eddb0..b84bbfe 100644 --- a/source/Atmoos.Sphere.Benchmark/Text/InsertFileBenchmark.cs +++ b/source/Atmoos.Sphere.Benchmark/Text/InsertFileBenchmark.cs @@ -40,17 +40,17 @@ public async Task InsertAsynchronously() /* Summary -BenchmarkDotNet v0.13.12, Arch Linux +BenchmarkDotNet v0.15.2, Linux Arch Linux Intel Core i7-8565U CPU 1.80GHz (Whiskey Lake), 1 CPU, 8 logical and 4 physical cores -.NET SDK 8.0.104 - [Host] : .NET 8.0.4 (8.0.424.16909), X64 RyuJIT AVX2 - ShortRun : .NET 8.0.4 (8.0.424.16909), X64 RyuJIT AVX2 +.NET SDK 9.0.109 + [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2 + ShortRun : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2 Job=ShortRun IterationCount=11 LaunchCount=1 WarmupCount=5 -| Method | Mean | Error | Ratio | Gen0 | Allocated | Alloc Ratio | -|--------------------- |-----------:|----------:|------:|-------:|----------:|------------:| -| InsertSynchronously | 269.4 μs | 11.90 μs | 0.22 | 1.4648 | 126.26 KB | 0.34 | -| InsertAsynchronously | 1,290.6 μs | 385.05 μs | 1.00 | 3.9063 | 367.64 KB | 1.00 | +| Method | Mean | Error | Ratio | Gen0 | Gen1 | Allocated | Alloc Ratio | +|--------------------- |-----------:|---------:|------:|--------:|-------:|----------:|------------:| +| InsertSynchronously | 557.3 μs | 2.47 μs | 0.31 | 30.2734 | 0.9766 | 126.28 KB | 0.34 | +| InsertAsynchronously | 1,802.7 μs | 29.86 μs | 1.00 | 89.8438 | - | 367.37 KB | 1.00 | Summary */ diff --git a/source/Atmoos.Sphere.Benchmark/Text/InsertStreamBenchmark.cs b/source/Atmoos.Sphere.Benchmark/Text/InsertStreamBenchmark.cs index d8cc2cb..3003c4b 100644 --- a/source/Atmoos.Sphere.Benchmark/Text/InsertStreamBenchmark.cs +++ b/source/Atmoos.Sphere.Benchmark/Text/InsertStreamBenchmark.cs @@ -78,26 +78,26 @@ public override async Task WriteLineAsync(ReadOnlyMemory value, Cancellati /* Summary -BenchmarkDotNet v0.13.12, Arch Linux +BenchmarkDotNet v0.15.2, Linux Arch Linux Intel Core i7-8565U CPU 1.80GHz (Whiskey Lake), 1 CPU, 8 logical and 4 physical cores -.NET SDK 8.0.104 - [Host] : .NET 8.0.4 (8.0.424.16909), X64 RyuJIT AVX2 - ShortRun : .NET 8.0.4 (8.0.424.16909), X64 RyuJIT AVX2 +.NET SDK 9.0.109 + [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2 + ShortRun : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2 Job=ShortRun InvocationCount=1 IterationCount=3 LaunchCount=1 UnrollFactor=1 WarmupCount=3 -| Method | MsDelay | Mean | Error | Ratio | Allocated | Alloc Ratio | -|--------------------- |-------- |-----------:|----------:|------:|----------:|------------:| -| InsertSynchronously | 1 | 550.4 ms | 330.54 ms | 1.43 | 7.38 KB | 0.14 | -| InsertAsynchronously | 1 | 384.5 ms | 85.77 ms | 1.00 | 51.75 KB | 1.00 | -| | | | | | | | -| InsertSynchronously | 2 | 1,039.3 ms | 198.50 ms | 1.44 | 7.38 KB | 0.14 | -| InsertAsynchronously | 2 | 721.1 ms | 52.39 ms | 1.00 | 51.75 KB | 1.00 | -| | | | | | | | -| InsertSynchronously | 4 | 1,970.9 ms | 43.91 ms | 1.46 | 7.38 KB | 0.14 | -| InsertAsynchronously | 4 | 1,350.7 ms | 31.04 ms | 1.00 | 51.75 KB | 1.00 | -| | | | | | | | -| InsertSynchronously | 8 | 4,066.4 ms | 139.37 ms | 1.47 | 7.38 KB | 0.14 | -| InsertAsynchronously | 8 | 2,764.5 ms | 388.46 ms | 1.00 | 51.75 KB | 1.00 | +| Method | MsDelay | Mean | Error | Ratio | Allocated | Alloc Ratio | +|--------------------- |-------- |-----------:|--------:|------:|----------:|------------:| +| InsertSynchronously | 1 | 474.7 ms | 7.01 ms | 1.45 | 6.66 KB | 0.13 | +| InsertAsynchronously | 1 | 327.5 ms | 6.07 ms | 1.00 | 50.75 KB | 1.00 | +| | | | | | | | +| InsertSynchronously | 2 | 945.4 ms | 5.30 ms | 1.46 | 6.66 KB | 0.13 | +| InsertAsynchronously | 2 | 647.5 ms | 9.14 ms | 1.00 | 50.75 KB | 1.00 | +| | | | | | | | +| InsertSynchronously | 4 | 1,870.2 ms | 2.88 ms | 1.46 | 6.66 KB | 0.13 | +| InsertAsynchronously | 4 | 1,278.7 ms | 6.61 ms | 1.00 | 50.75 KB | 1.00 | +| | | | | | | | +| InsertSynchronously | 8 | 3,718.6 ms | 4.08 ms | 1.46 | 6.66 KB | 0.13 | +| InsertAsynchronously | 8 | 2,539.1 ms | 4.32 ms | 1.00 | 50.75 KB | 1.00 | Summary */