Skip to content

Update dependencies for .NET 8 and analyzers group - #38

Merged
GabrielMarquezMatte merged 15 commits into
masterfrom
develop
Jul 15, 2026
Merged

Update dependencies for .NET 8 and analyzers group#38
GabrielMarquezMatte merged 15 commits into
masterfrom
develop

Conversation

@GabrielMarquezMatte

Copy link
Copy Markdown
Owner

This pull request introduces .NET 8.0 multi-targeting, updates analyzer and dependency versions, and adds preliminary support for ref struct models in .NET 9.0 and above. The changes are divided into three main themes: platform support, analyzer/dependency updates, and code changes for ref struct support.

Platform and Targeting Enhancements:

  • Updated project files (.csproj) to multi-target both .NET 8.0 and .NET 10.0 for the main library and test projects, improving compatibility and test coverage. [1] [2]
  • Added System.IO.Pipelines dependency for the .NET 8.0 target to ensure feature parity.
  • Changed generator project to target netstandard2.1 (was netstandard2.0), and updated Microsoft.CodeAnalysis.CSharp to 5.6.0. [1] [2]

Analyzer and Dependency Updates:

  • Updated several analyzer package versions in Directory.Build.props to latest stable releases, including SonarAnalyzer.CSharp, Meziantou.Analyzer, Microsoft.CodeAnalysis.BannedApiAnalyzers, Roslyn.Diagnostics.Analyzers, Microsoft.CodeAnalysis.Analyzers, and SharpSource. [1] [2]
  • Updated test dependencies: Microsoft.CodeAnalysis.CSharp to 5.6.0 and Microsoft.Testing.Extensions.CodeCoverage to 18.9.0.

Ref struct Model Support (for .NET 9.0+):

  • Added conditional where TModel : allows ref struct constraints and preprocessor directives throughout the codebase to allow ref struct models when targeting .NET 9.0 or greater. This affects delegates, interfaces, parser classes, and factory methods. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19]
  • Added a new test (guarded by #if NET9_0_OR_GREATER) to verify parsing of ref struct models. [1] [2]

These changes modernize the codebase, improve analyzer coverage, and prepare the library for advanced .NET features, especially around ref struct support in .NET 9.0 and above.

Gabriel Matte and others added 15 commits June 25, 2026 18:16
Bumps Meziantou.Analyzer from 3.0.114 to 3.0.117
Bumps SharpSource from 1.33.1 to 1.33.2
Bumps SonarAnalyzer.CSharp from 10.27.0.140913 to 10.28.0.143324

---
updated-dependencies:
- dependency-name: Meziantou.Analyzer
  dependency-version: 3.0.117
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: analyzers
- dependency-name: SharpSource
  dependency-version: 1.33.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: analyzers
- dependency-name: SonarAnalyzer.CSharp
  dependency-version: 10.28.0.143324
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: analyzers
...

Signed-off-by: dependabot[bot] <support@github.com>
---
updated-dependencies:
- dependency-name: System.IO.Pipelines
  dependency-version: 10.0.9
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…FixedWidthParser/develop/System.IO.Pipelines-10.0.9

Bump System.IO.Pipelines from 8.0.0 to 10.0.9
…lop/analyzers-d35d93e39d

Bump the analyzers group with 3 updates
Bumps Meziantou.Analyzer from 3.0.117 to 3.0.122
Bumps Microsoft.CodeAnalysis.Analyzers from 5.3.0 to 5.6.0
Bumps Microsoft.CodeAnalysis.BannedApiAnalyzers from 5.0.0-1.25277.114 to 5.6.0
Bumps Microsoft.CodeAnalysis.CSharp from 5.3.0 to 5.6.0
Bumps Roslyn.Diagnostics.Analyzers from 5.0.0-1.25277.114 to 5.6.0
Bumps SharpSource from 1.33.2 to 1.33.3

---
updated-dependencies:
- dependency-name: Meziantou.Analyzer
  dependency-version: 3.0.122
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: analyzers
- dependency-name: Microsoft.CodeAnalysis.Analyzers
  dependency-version: 5.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: analyzers
- dependency-name: Microsoft.CodeAnalysis.CSharp
  dependency-version: 5.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: analyzers
- dependency-name: Microsoft.CodeAnalysis.BannedApiAnalyzers
  dependency-version: 5.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: analyzers
- dependency-name: Roslyn.Diagnostics.Analyzers
  dependency-version: 5.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: analyzers
- dependency-name: SharpSource
  dependency-version: 1.33.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: analyzers
...

Signed-off-by: dependabot[bot] <support@github.com>
---
updated-dependencies:
- dependency-name: Microsoft.CodeAnalysis.CSharp
  dependency-version: 5.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Microsoft.CodeAnalysis.CSharp
  dependency-version: 5.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…lop/analyzers-91781e5e57

Bump the analyzers group with 6 updates
…FixedWidthParser.Generator/develop/multi-fc18b8fd9f

Bump Microsoft.CodeAnalysis.CSharp from 5.3.0 to 5.6.0
---
updated-dependencies:
- dependency-name: Microsoft.Testing.Extensions.CodeCoverage
  dependency-version: 18.9.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Microsoft.Testing.Extensions.CodeCoverage
  dependency-version: 18.9.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
---
updated-dependencies:
- dependency-name: Microsoft.Testing.Extensions.TrxReport
  dependency-version: 2.3.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…s/FixedWidthParser.Generator.Tests/develop/Microsoft.Testing.Extensions.TrxReport-2.3.2

Bump Microsoft.Testing.Extensions.TrxReport from 2.2.3 to 2.3.2
…s/FixedWidthParser.Generator.Tests/develop/multi-0ff5bb3112

Bump Microsoft.Testing.Extensions.CodeCoverage from 18.8.0 to 18.9.0
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.43%. Comparing base (ab010d6) to head (6860f97).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #38   +/-   ##
=======================================
  Coverage   97.43%   97.43%           
=======================================
  Files          43       43           
  Lines        1323     1323           
  Branches      199      199           
=======================================
  Hits         1289     1289           
  Misses          9        9           
  Partials       25       25           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown

Benchmark Results

Measured on ubuntu-latest (GitHub Actions). Runner noise may affect absolute numbers; use these for relative comparisons within a PR.

Benchmarks.Perf.AsyncReaderBenchmarks


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 7763 2.61GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.302
  [Host]     : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Count Mean Error StdDev Ratio RatioSD Gen0 Allocated Alloc Ratio
GeneratedReader_ReadAsync 100 5.594 μs 0.1186 μs 0.0308 μs 0.72 0.01 0.2518 4216 B 0.23
SpanReader_ReadAsync 100 7.663 μs 0.0219 μs 0.0057 μs 0.98 0.01 0.2441 4232 B 0.23
Naive_ReadLineAsync 100 7.799 μs 0.4757 μs 0.1235 μs 1.00 0.02 1.0986 18424 B 1.00
GeneratedReader_ReadAsync_Pooled 100 11.281 μs 0.0277 μs 0.0043 μs 1.45 0.02 0.0153 296 B 0.02
SpanReader_ReadAsync_Pooled 100 12.752 μs 0.2264 μs 0.0588 μs 1.64 0.02 0.0153 312 B 0.02
GeneratedReader_ReadAsync 1000 54.563 μs 1.4296 μs 0.3713 μs 0.74 0.01 2.3193 39496 B 0.215
Naive_ReadLineAsync 1000 73.580 μs 2.6609 μs 0.6910 μs 1.00 0.01 10.8643 183304 B 1.000
SpanReader_ReadAsync 1000 93.068 μs 0.4999 μs 0.0774 μs 1.26 0.01 2.3193 39512 B 0.216
GeneratedReader_ReadAsync_Pooled 1000 104.532 μs 1.9681 μs 0.3046 μs 1.42 0.01 - 296 B 0.002
SpanReader_ReadAsync_Pooled 1000 129.870 μs 1.6653 μs 0.2577 μs 1.77 0.02 - 312 B 0.002

Benchmarks.Perf.ByteReaderBenchmarks


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.302
  [Host]     : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Count Mean Error StdDev Ratio RatioSD Gen0 Allocated Alloc Ratio
CharParser_Parse 100 4.650 μs 0.1801 μs 0.0279 μs 1.00 0.01 0.2289 3.83 KB 1.00
ByteParser_Parse 100 5.338 μs 0.1874 μs 0.0487 μs 1.15 0.01 0.2289 3.83 KB 1.00
CharParser_Parse_AfterUtf8Decode 100 7.013 μs 0.1659 μs 0.0431 μs 1.51 0.01 0.6638 10.86 KB 2.84
CharParser_Parse 1000 44.411 μs 3.2573 μs 0.8459 μs 1.00 0.02 2.3193 38.28 KB 1.00
ByteParser_Parse 1000 52.047 μs 1.6685 μs 0.4333 μs 1.17 0.02 2.3193 38.28 KB 1.00
CharParser_Parse_AfterUtf8Decode 1000 71.471 μs 3.1125 μs 0.8083 μs 1.61 0.03 6.5918 108.59 KB 2.84

Benchmarks.Perf.ByteReaderPoolingBenchmarks


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.302
  [Host]     : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Count Mean Error StdDev Ratio RatioSD Gen0 Allocated Alloc Ratio
NoString 100 3.294 μs 0.1472 μs 0.0382 μs 0.58 0.01 - - 0.00
WithString_NoPool 100 5.706 μs 0.2834 μs 0.0736 μs 1.00 0.02 0.2289 3920 B 1.00
WithString_Pooled 100 12.748 μs 0.2125 μs 0.0552 μs 2.23 0.03 - - 0.00
NoString 1000 37.926 μs 2.0438 μs 0.3163 μs 0.67 0.01 - - 0.00
WithString_NoPool 1000 56.796 μs 2.8801 μs 0.7480 μs 1.00 0.02 2.3193 39200 B 1.00
WithString_Pooled 1000 129.262 μs 9.9596 μs 1.5413 μs 2.28 0.04 - - 0.00

Benchmarks.Perf.ByteReaderStreamBenchmarks


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.302
  [Host]     : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Count Mean Error StdDev Ratio Gen0 Gen1 Allocated Alloc Ratio
ByteReader_Read 100 5.462 μs 0.1957 μs 0.0508 μs 0.84 0.2289 - 3.83 KB 0.24
CharReader_Read 100 6.538 μs 0.2853 μs 0.0741 μs 1.00 0.9766 0.0458 16.03 KB 1.00
CharReader_Read 1000 54.883 μs 2.2935 μs 0.3549 μs 1.00 3.0518 0.1221 50.48 KB 1.00
ByteReader_Read 1000 56.157 μs 1.9164 μs 0.4977 μs 1.02 2.3193 - 38.28 KB 0.76

Benchmarks.Perf.ComparisonBenchmarks


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 9V74 2.74GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.302
  [Host]     : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Count Mean Error StdDev Ratio Gen0 Gen1 Allocated Alloc Ratio
FixedWidthParser_Generated 100 4.245 μs 0.0503 μs 0.0078 μs 0.12 0.2289 - 3.86 KB 0.09
FixedWidthParser_Read 100 6.075 μs 0.0350 μs 0.0054 μs 0.17 0.2289 - 3.86 KB 0.09
RecordParser_Read 100 10.913 μs 0.1251 μs 0.0325 μs 0.31 0.2441 - 4.23 KB 0.10
FileHelpers_Read 100 35.270 μs 0.8500 μs 0.2207 μs 1.00 2.5024 0.0610 41.49 KB 1.00
FlatFiles_Read 100 64.293 μs 1.2068 μs 0.3134 μs 1.82 6.2256 0.1221 103.13 KB 2.49
FixedWidthParser_Generated 1000 42.380 μs 0.6715 μs 0.1039 μs 0.12 2.3193 - 38.31 KB 0.09
FixedWidthParser_Read 1000 56.149 μs 0.6044 μs 0.1570 μs 0.16 2.3193 - 38.31 KB 0.09
RecordParser_Read 1000 108.760 μs 1.3005 μs 0.2013 μs 0.31 2.3193 - 38.69 KB 0.10
FileHelpers_Read 1000 355.264 μs 6.6409 μs 1.0277 μs 1.00 24.4141 5.8594 406.42 KB 1.00
FlatFiles_Read 1000 645.001 μs 11.2495 μs 2.9215 μs 1.82 57.6172 1.9531 953.2 KB 2.35

Benchmarks.Perf.ComparisonWriterBenchmarks


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 9V74 2.74GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.302
  [Host]     : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Count Mean Error StdDev Ratio RatioSD Gen0 Gen1 Allocated Alloc Ratio
FixedWidthParser_Write 1 119.3 ns 0.84 ns 0.13 ns 0.67 0.00 - - - 0.00
FileHelpers_Write 1 177.9 ns 2.77 ns 0.72 ns 1.00 0.01 0.0215 - 360 B 1.00
FlatFiles_Write 1 425.8 ns 18.43 ns 4.79 ns 2.39 0.03 0.0424 - 712 B 1.98
RecordParser_Write 1 18,987.7 ns 781.69 ns 203.00 ns 106.72 1.11 1.0986 0.0305 18128 B 50.36
FixedWidthParser_Write 100 12,277.7 ns 31.08 ns 4.81 ns 0.68 0.01 - - - 0.00
FileHelpers_Write 100 18,130.8 ns 749.12 ns 194.54 ns 1.00 0.01 1.9531 - 32832 B 1.00
FlatFiles_Write 100 44,835.2 ns 1,175.01 ns 305.15 ns 2.47 0.03 4.2114 - 71200 B 2.17
RecordParser_Write 100 50,609.2 ns 10,730.66 ns 1,660.58 ns 2.79 0.09 1.2207 - 20440 B 0.62
FixedWidthParser_Write 1000 123,204.8 ns 346.48 ns 53.62 ns 0.67 0.01 - - - 0.00
FileHelpers_Write 1000 182,786.4 ns 7,860.01 ns 2,041.22 ns 1.00 0.01 19.5313 - 328032 B 1.00
FlatFiles_Write 1000 431,570.9 ns 3,967.36 ns 1,030.31 ns 2.36 0.02 42.4805 - 712000 B 2.17
RecordParser_Write 1000 461,152.6 ns 111,590.95 ns 28,979.81 ns 2.52 0.15 80.0781 78.1250 1333599 B 4.07

Benchmarks.Perf.ParserBenchmarks


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 9V74 2.60GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.302
  [Host]     : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Line Mean Error StdDev Ratio RatioSD Gen0 Allocated Alloc Ratio
Parse_NoPool Jane (...)0.00 [25] 45.44 ns 2.248 ns 0.584 ns 1.00 0.02 0.0029 48 B 1.00
Parse_WithStringPool Jane (...)0.00 [25] 74.62 ns 0.664 ns 0.172 ns 1.64 0.02 - - 0.00
Parse_NoPool John (...)0.00 [25] 50.18 ns 0.913 ns 0.141 ns 1.00 0.00 0.0024 40 B 1.00
Parse_WithStringPool John (...)0.00 [25] 74.10 ns 0.242 ns 0.037 ns 1.48 0.00 - - 0.00

Benchmarks.Perf.PipeReaderBenchmarks


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.302
  [Host]     : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Count Mean Error StdDev Ratio RatioSD Gen0 Allocated Alloc Ratio
Stream_ReadAsync 100 7.319 μs 0.5228 μs 0.0809 μs 1.00 0.01 0.2441 4.08 KB 1.00
Pipe_ReadAsync 100 19.190 μs 1.5448 μs 0.4012 μs 2.62 0.06 0.2441 4.41 KB 1.08
Pipe_ReadAsync_SmallSegments 100 59.235 μs 1.1985 μs 0.3112 μs 8.09 0.09 0.2441 4.6 KB 1.13
Stream_ReadAsync 1000 75.658 μs 2.0373 μs 0.3153 μs 1.00 0.01 2.3193 38.53 KB 1.00
Pipe_ReadAsync 1000 185.215 μs 6.3531 μs 1.6499 μs 2.45 0.02 2.1973 38.96 KB 1.01
Pipe_ReadAsync_SmallSegments 1000 584.074 μs 27.5489 μs 7.1544 μs 7.72 0.09 1.9531 39.05 KB 1.01

Benchmarks.Perf.ReaderBenchmarks


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 7763 2.61GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.302
  [Host]     : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Count Mean Error StdDev Ratio RatioSD Gen0 Allocated Alloc Ratio
GeneratedReader_Read 100 4.162 μs 0.0336 μs 0.0052 μs 0.64 0.00 0.2289 3952 B 0.354
SpanReader_Read 100 5.657 μs 0.0870 μs 0.0226 μs 0.87 0.00 0.2289 3952 B 0.354
Naive_ReadLine 100 6.530 μs 0.1470 μs 0.0227 μs 1.00 0.00 0.6638 11152 B 1.000
GeneratedReader_Read_Pooled 100 8.550 μs 0.2230 μs 0.0345 μs 1.31 0.01 - 32 B 0.003
SpanReader_Read_Pooled 100 10.161 μs 0.0813 μs 0.0126 μs 1.56 0.01 - 32 B 0.003
GeneratedReader_Read 1000 41.149 μs 0.2110 μs 0.0548 μs 0.67 0.01 2.3193 39232 B 0.353
Naive_ReadLine 1000 60.976 μs 3.8815 μs 1.0080 μs 1.00 0.02 6.5918 111232 B 1.000
SpanReader_Read 1000 64.049 μs 1.1981 μs 0.3112 μs 1.05 0.02 2.3193 39232 B 0.353
GeneratedReader_Read_Pooled 1000 88.863 μs 1.7534 μs 0.4554 μs 1.46 0.02 - 32 B 0.000
SpanReader_Read_Pooled 1000 106.986 μs 0.5960 μs 0.0922 μs 1.75 0.03 - 32 B 0.000

Benchmarks.Perf.ReaderStartupBenchmarks


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 7763 2.61GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.302
  [Host]     : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Mean Error StdDev Ratio Gen0 Allocated Alloc Ratio
GeneratedReader_ReadOne 97.05 ns 4.440 ns 1.153 ns 0.90 0.0043 72 B 0.75
ReflectionReader_ConstructAndReadOne 107.26 ns 4.689 ns 0.726 ns 1.00 0.0057 96 B 1.00

Benchmarks.Perf.SourceGenParserBenchmarks


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 9V74 2.60GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.302
  [Host]     : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Line Mean Error StdDev Ratio Gen0 Allocated Alloc Ratio
Reflection John (...)00.00 [25] 47.03 ns 1.033 ns 0.268 ns 1.00 0.0024 40 B 1.00
Generated John (...)00.00 [25] 49.64 ns 0.450 ns 0.070 ns 1.06 0.0024 40 B 1.00

Benchmarks.Perf.WriterBenchmarks


BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.302
  [Host]     : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3
  Job-MEHJPP : .NET 10.0.10 (10.0.10, 10.0.1026.32716), X64 RyuJIT x86-64-v3

IterationCount=5  WarmupCount=1  

Method Count Mean Error StdDev Ratio RatioSD Gen0 Gen1 Allocated Alloc Ratio
WriteMany_ReuseWriterSpan 1 119.2 ns 0.55 ns 0.09 ns 0.37 0.00 - - - 0.00
WriteMany_ReuseWriter 1 120.8 ns 0.44 ns 0.07 ns 0.37 0.00 - - - 0.00
WriteMany_AsyncReuseWriter 1 169.0 ns 0.71 ns 0.11 ns 0.52 0.00 0.0019 - 32 B 0.01
WriteMany_NewStream 1 323.7 ns 13.46 ns 2.08 ns 1.00 0.01 0.1326 - 2224 B 1.00
WriteMany_AsyncNewStream 1 628.0 ns 16.88 ns 4.38 ns 1.94 0.02 0.3204 0.0029 5360 B 2.41
WriteMany_ReuseWriter 100 12,551.5 ns 189.72 ns 49.27 ns 0.96 0.00 - - - 0.000
WriteMany_ReuseWriterSpan 100 12,790.7 ns 246.38 ns 63.99 ns 0.98 0.00 - - - 0.000
WriteMany_NewStream 100 13,010.0 ns 81.26 ns 12.57 ns 1.00 0.00 0.3052 - 5328 B 1.000
WriteMany_AsyncReuseWriter 100 14,115.2 ns 160.58 ns 24.85 ns 1.08 0.00 - - 32 B 0.006
WriteMany_AsyncNewStream 100 14,790.6 ns 728.45 ns 189.18 ns 1.14 0.01 0.3204 - 5360 B 1.006
WriteMany_ReuseWriter 1000 122,492.9 ns 487.18 ns 75.39 ns 0.96 0.00 - - - 0.000
WriteMany_ReuseWriterSpan 1000 123,899.2 ns 635.47 ns 98.34 ns 0.97 0.00 - - - 0.000
WriteMany_NewStream 1000 127,684.8 ns 256.65 ns 39.72 ns 1.00 0.00 0.2441 - 5328 B 1.000
WriteMany_AsyncReuseWriter 1000 143,256.6 ns 1,113.47 ns 172.31 ns 1.12 0.00 - - 32 B 0.006
WriteMany_AsyncNewStream 1000 144,337.5 ns 2,752.44 ns 714.80 ns 1.13 0.01 0.2441 - 5360 B 1.006

@GabrielMarquezMatte
GabrielMarquezMatte merged commit 41f595f into master Jul 15, 2026
12 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.

2 participants