Skip to content

Conversation

twsouthwick
Copy link
Member

@twsouthwick twsouthwick commented Nov 27, 2024

This is part of what will probably be a few PRs to replace the generic builder pattern in use for defining element metadata. This causes a lot of JITing to occur and causes the ballooning of AOT builds.

Looks like around 5% faster while doing a file read and has removed about 25% of the generic types

Before


BenchmarkDotNet v0.14.0, Windows 11 (10.0.22631.4460/23H2/2023Update/SunValley3)
AMD Ryzen 7 3700X, 1 CPU, 16 logical and 8 physical cores
.NET SDK 9.0.100
  [Host]     : .NET 8.0.11 (8.0.1124.51707), X64 RyuJIT AVX2
  DefaultJob : .NET 8.0.11 (8.0.1124.51707), X64 RyuJIT AVX2


Method Mean Error StdDev Median Gen0 Gen1 Allocated
Create 41.08 us 0.805 us 1.644 us 40.60 us 6.1035 0.2441 51.52 KB
CreateNoSave 40.05 us 0.491 us 0.436 us 40.14 us 6.1035 0.2441 51.52 KB
ReadFile 907.67 us 18.005 us 42.441 us 892.08 us 29.2969 3.9063 255.22 KB

After


BenchmarkDotNet v0.14.0, Windows 11 (10.0.22631.4460/23H2/2023Update/SunValley3)
AMD Ryzen 7 3700X, 1 CPU, 16 logical and 8 physical cores
.NET SDK 9.0.100
  [Host]     : .NET 8.0.11 (8.0.1124.51707), X64 RyuJIT AVX2
  DefaultJob : .NET 8.0.11 (8.0.1124.51707), X64 RyuJIT AVX2


Method Mean Error StdDev Gen0 Gen1 Allocated
Create 39.82 μs 0.756 μs 0.708 μs 6.1035 0.2441 51.52 KB
CreateNoSave 39.16 μs 0.620 μs 0.550 μs 6.1035 0.2441 51.52 KB
ReadFile 868.19 μs 17.059 μs 33.672 μs 29.2969 3.9063 255.22 KB

Copy link

github-actions bot commented Nov 27, 2024

Test Results

    57 files  +  1      57 suites  +1   56m 33s ⏱️ + 4m 49s
 2 050 tests ±  0   2 047 ✅ ±  0   3 💤 ±0  0 ❌ ±0 
32 020 runs  +170  31 984 ✅ +170  36 💤 ±0  0 ❌ ±0 

Results for commit 40c7ec8. ± Comparison against base commit 4219646.

♻️ This comment has been updated with latest results.

mikeebowen
mikeebowen previously approved these changes Nov 27, 2024
tomjebo
tomjebo previously approved these changes Mar 27, 2025
mikeebowen
mikeebowen previously approved these changes Mar 27, 2025
@twsouthwick twsouthwick dismissed stale reviews from mikeebowen and tomjebo via 40c7ec8 March 31, 2025 22:57
@twsouthwick twsouthwick enabled auto-merge (squash) March 31, 2025 22:58
@twsouthwick twsouthwick merged commit fcc4a00 into dotnet:main Apr 3, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants