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

Remove generic builder pattern from element metadata creation (Part 1) #1842

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

twsouthwick
Copy link
Member

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. This has removed about 25% of the generic types, so potentially will make things about 25% faster once completed.

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

    70 files  ±0      70 suites  ±0   1h 7m 45s ⏱️ - 1m 15s
 2 041 tests ±0   2 038 ✅ ±0   3 💤 ±0  0 ❌ ±0 
32 418 runs  ±0  32 382 ✅ ±0  36 💤 ±0  0 ❌ ±0 

Results for commit 46a46f7. ± Comparison against base commit 89cd570.

♻️ This comment has been updated with latest results.

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.

2 participants