Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
63b2b98
fix: adds a null value sentinel to enable roundtrip serializations of…
baywet Oct 23, 2025
c6a3a10
chore: Potential fix for code scanning alert no. 2327: Missed ternary…
baywet Oct 23, 2025
67789f3
chore: avoid systematically cloning to reduce performance impact
baywet Oct 23, 2025
c5d9330
tests: adds unit test for the JsonNUll sentinel
baywet Oct 23, 2025
6ce3214
perf: use deep equals for comparison to reduce allocations
baywet Oct 23, 2025
17deefe
tests: adds a unit tests to validate an identical value matches the s…
baywet Oct 23, 2025
f58aad2
perf: reduce allocations in mapnode
baywet Oct 23, 2025
bdb5264
perf: only initialize map node nodes on demand
baywet Oct 23, 2025
339f61f
chore; refactoring
baywet Oct 23, 2025
d3c758b
perf: switches to lazy instantiation
baywet Oct 23, 2025
1c96521
perf: removes the lazy initialization since the node is always enumer…
baywet Oct 23, 2025
3ee8ad8
Merge branch 'main' into fix/json-node-null
baywet Oct 23, 2025
5aea977
ci: make ratio non-absolute
baywet Oct 23, 2025
1de7355
ci: because I can't calculate a ratio properly...
baywet Oct 23, 2025
4e75438
ci: adds better error message
baywet Oct 23, 2025
dbbbf13
perf: do not duplicate nodes when indexing
baywet Oct 23, 2025
199b887
chore: refactoring
baywet Oct 23, 2025
ba1486b
Revert "chore: refactoring"
baywet Oct 23, 2025
1b27a26
Revert "perf: do not duplicate nodes when indexing"
baywet Oct 23, 2025
c24dfbd
chore: removes unused API surface
baywet Oct 23, 2025
61645ae
chore: updates performance tests reports
baywet Oct 23, 2025
2729704
Revert "chore: removes unused API surface"
baywet Oct 23, 2025
cbbcfbd
chore: avoid double enumeration of map nodes in V2
baywet Oct 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
```

BenchmarkDotNet v0.15.2, Linux Ubuntu 24.04.2 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
.NET SDK 8.0.413
[Host] : .NET 8.0.19 (8.0.1925.36514), X64 RyuJIT AVX2
ShortRun : .NET 8.0.19 (8.0.1925.36514), X64 RyuJIT AVX2
BenchmarkDotNet v0.15.4, Windows 11 (10.0.26200.6899)
11th Gen Intel Core i7-1185G7 3.00GHz, 1 CPU, 8 logical and 4 physical cores
.NET SDK 8.0.415
[Host] : .NET 8.0.21 (8.0.21, 8.0.2125.47513), X64 RyuJIT x86-64-v4
ShortRun : .NET 8.0.21 (8.0.21, 8.0.2125.47513), X64 RyuJIT x86-64-v4

Job=ShortRun IterationCount=3 LaunchCount=1
WarmupCount=3

```
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Gen2 | Allocated |
|------------- |---------------:|--------------:|------------:|-----------:|-----------:|----------:|-------------:|
| PetStoreYaml | 529.5 μs | 62.50 μs | 3.43 μs | 23.4375 | 3.9063 | - | 387.26 KB |
| PetStoreJson | 240.8 μs | 15.69 μs | 0.86 μs | 13.6719 | 1.9531 | - | 249.1 KB |
| GHESYaml | 1,097,576.6 μs | 100,584.42 μs | 5,513.37 μs | 26000.0000 | 20000.0000 | 3000.0000 | 384492.38 KB |
| GHESJson | 516,328.2 μs | 87,964.22 μs | 4,821.62 μs | 16000.0000 | 9000.0000 | 2000.0000 | 245957.5 KB |
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Gen2 | Allocated |
|------------- |-------------:|--------------:|-------------:|-----------:|-----------:|----------:|-------------:|
| PetStoreYaml | 407.7 μs | 134.55 μs | 7.38 μs | 58.5938 | 7.8125 | - | 360.8 KB |
| PetStoreJson | 166.3 μs | 23.12 μs | 1.27 μs | 36.1328 | 6.8359 | - | 222.95 KB |
| GHESYaml | 896,578.2 μs | 138,441.39 μs | 7,588.44 μs | 60000.0000 | 23000.0000 | 4000.0000 | 345015.7 KB |
| GHESJson | 432,991.2 μs | 243,041.11 μs | 13,321.90 μs | 33000.0000 | 12000.0000 | 2000.0000 | 206538.29 KB |
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Method,Job,AnalyzeLaunchVariance,EvaluateOverhead,MaxAbsoluteError,MaxRelativeError,MinInvokeCount,MinIterationTime,OutlierMode,Affinity,EnvironmentVariables,Jit,LargeAddressAware,Platform,PowerPlanMode,Runtime,AllowVeryLargeObjects,Concurrent,CpuGroups,Force,HeapAffinitizeMask,HeapCount,NoAffinitize,RetainVm,Server,Arguments,BuildConfiguration,Clock,EngineFactory,NuGetReferences,Toolchain,IsMutator,InvocationCount,IterationCount,IterationTime,LaunchCount,MaxIterationCount,MaxWarmupIterationCount,MemoryRandomization,MinIterationCount,MinWarmupIterationCount,RunStrategy,UnrollFactor,WarmupCount,Mean,Error,StdDev,Gen0,Gen1,Gen2,Allocated
PetStoreYaml,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,529.5 μs,62.50 μs,3.43 μs,23.4375,3.9063,0.0000,387.26 KB
PetStoreJson,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,240.8 μs,15.69 μs,0.86 μs,13.6719,1.9531,0.0000,249.1 KB
GHESYaml,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,"1,097,576.6 μs","100,584.42 μs","5,513.37 μs",26000.0000,20000.0000,3000.0000,384492.38 KB
GHESJson,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,"516,328.2 μs","87,964.22 μs","4,821.62 μs",16000.0000,9000.0000,2000.0000,245957.5 KB
PetStoreYaml,ShortRun,False,Default,Default,Default,Default,Default,Default,11111111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,407.7 μs,134.55 μs,7.38 μs,58.5938,7.8125,0.0000,360.8 KB
PetStoreJson,ShortRun,False,Default,Default,Default,Default,Default,Default,11111111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,166.3 μs,23.12 μs,1.27 μs,36.1328,6.8359,0.0000,222.95 KB
GHESYaml,ShortRun,False,Default,Default,Default,Default,Default,Default,11111111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,"896,578.2 μs","138,441.39 μs","7,588.44 μs",60000.0000,23000.0000,4000.0000,345015.7 KB
GHESJson,ShortRun,False,Default,Default,Default,Default,Default,Default,11111111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,"432,991.2 μs","243,041.11 μs","13,321.90 μs",33000.0000,12000.0000,2000.0000,206538.29 KB
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang='en'>
<head>
<meta charset='utf-8' />
<title>performance.Descriptions-20250820-142630</title>
<title>performance.Descriptions-20251023-154034</title>

<style type="text/css">
table { border-collapse: collapse; display: block; width: 100%; overflow: auto; }
Expand All @@ -13,23 +13,23 @@
</head>
<body>
<pre><code>
BenchmarkDotNet v0.15.2, Linux Ubuntu 24.04.2 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
.NET SDK 8.0.413
[Host] : .NET 8.0.19 (8.0.1925.36514), X64 RyuJIT AVX2
ShortRun : .NET 8.0.19 (8.0.1925.36514), X64 RyuJIT AVX2
BenchmarkDotNet v0.15.4, Windows 11 (10.0.26200.6899)
11th Gen Intel Core i7-1185G7 3.00GHz, 1 CPU, 8 logical and 4 physical cores
.NET SDK 8.0.415
[Host] : .NET 8.0.21 (8.0.21, 8.0.2125.47513), X64 RyuJIT x86-64-v4
ShortRun : .NET 8.0.21 (8.0.21, 8.0.2125.47513), X64 RyuJIT x86-64-v4
</code></pre>
<pre><code>Job=ShortRun IterationCount=3 LaunchCount=1
WarmupCount=3
</code></pre>

<table>
<thead><tr><th>Method</th><th>Mean </th><th>Error </th><th>StdDev</th><th>Gen0</th><th>Gen1</th><th>Gen2</th><th>Allocated</th>
<thead><tr><th>Method</th><th>Mean </th><th>Error </th><th>StdDev</th><th>Gen0</th><th>Gen1</th><th>Gen2</th><th>Allocated</th>
</tr>
</thead><tbody><tr><td>PetStoreYaml</td><td>529.5 &mu;s</td><td>62.50 &mu;s</td><td>3.43 &mu;s</td><td>23.4375</td><td>3.9063</td><td>-</td><td>387.26 KB</td>
</tr><tr><td>PetStoreJson</td><td>240.8 &mu;s</td><td>15.69 &mu;s</td><td>0.86 &mu;s</td><td>13.6719</td><td>1.9531</td><td>-</td><td>249.1 KB</td>
</tr><tr><td>GHESYaml</td><td>1,097,576.6 &mu;s</td><td>100,584.42 &mu;s</td><td>5,513.37 &mu;s</td><td>26000.0000</td><td>20000.0000</td><td>3000.0000</td><td>384492.38 KB</td>
</tr><tr><td>GHESJson</td><td>516,328.2 &mu;s</td><td>87,964.22 &mu;s</td><td>4,821.62 &mu;s</td><td>16000.0000</td><td>9000.0000</td><td>2000.0000</td><td>245957.5 KB</td>
</thead><tbody><tr><td>PetStoreYaml</td><td>407.7 &mu;s</td><td>134.55 &mu;s</td><td>7.38 &mu;s</td><td>58.5938</td><td>7.8125</td><td>-</td><td>360.8 KB</td>
</tr><tr><td>PetStoreJson</td><td>166.3 &mu;s</td><td>23.12 &mu;s</td><td>1.27 &mu;s</td><td>36.1328</td><td>6.8359</td><td>-</td><td>222.95 KB</td>
</tr><tr><td>GHESYaml</td><td>896,578.2 &mu;s</td><td>138,441.39 &mu;s</td><td>7,588.44 &mu;s</td><td>60000.0000</td><td>23000.0000</td><td>4000.0000</td><td>345015.7 KB</td>
</tr><tr><td>GHESJson</td><td>432,991.2 &mu;s</td><td>243,041.11 &mu;s</td><td>13,321.90 &mu;s</td><td>33000.0000</td><td>12000.0000</td><td>2000.0000</td><td>206538.29 KB</td>
</tr></tbody></table>
</body>
</html>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
```

BenchmarkDotNet v0.15.2, Linux Ubuntu 24.04.2 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
.NET SDK 8.0.413
[Host] : .NET 8.0.19 (8.0.1925.36514), X64 RyuJIT AVX2
ShortRun : .NET 8.0.19 (8.0.1925.36514), X64 RyuJIT AVX2
BenchmarkDotNet v0.15.4, Windows 11 (10.0.26200.6899)
11th Gen Intel Core i7-1185G7 3.00GHz, 1 CPU, 8 logical and 4 physical cores
.NET SDK 8.0.415
[Host] : .NET 8.0.21 (8.0.21, 8.0.2125.47513), X64 RyuJIT x86-64-v4
ShortRun : .NET 8.0.21 (8.0.21, 8.0.2125.47513), X64 RyuJIT x86-64-v4

Job=ShortRun IterationCount=3 LaunchCount=1
WarmupCount=3

```
| Method | Mean | Error | StdDev | Gen0 | Allocated |
|---------------------------- |-------------:|----------:|----------:|-------:|----------:|
| EmptyApiCallback | 16.112 ns | 5.784 ns | 0.3170 ns | 0.0019 | 32 B |
| EmptyApiComponents | 19.110 ns | 22.757 ns | 1.2474 ns | 0.0062 | 104 B |
| EmptyApiContact | 9.642 ns | 11.245 ns | 0.6164 ns | 0.0029 | 48 B |
| EmptyApiDiscriminator | 12.330 ns | 5.798 ns | 0.3178 ns | 0.0024 | 40 B |
| EmptyDocument | 1,151.986 ns | 65.900 ns | 3.6122 ns | 0.0668 | 1136 B |
| EmptyApiEncoding | 10.202 ns | 4.448 ns | 0.2438 ns | 0.0033 | 56 B |
| EmptyApiExample | 13.840 ns | 18.878 ns | 1.0348 ns | 0.0033 | 56 B |
| EmptyApiExternalDocs | 13.485 ns | 20.898 ns | 1.1455 ns | 0.0024 | 40 B |
| EmptyApiHeader | 14.911 ns | 21.281 ns | 1.1665 ns | 0.0048 | 80 B |
| EmptyApiInfo | 17.285 ns | 11.383 ns | 0.6239 ns | 0.0048 | 80 B |
| EmptyApiLicense | 15.353 ns | 15.752 ns | 0.8634 ns | 0.0029 | 48 B |
| EmptyApiLink | 13.631 ns | 16.538 ns | 0.9065 ns | 0.0043 | 72 B |
| EmptyApiMediaType | 8.334 ns | 3.227 ns | 0.1769 ns | 0.0033 | 56 B |
| EmptyApiOAuthFlow | 10.103 ns | 8.885 ns | 0.4870 ns | 0.0033 | 56 B |
| EmptyApiOAuthFlows | 11.514 ns | 6.548 ns | 0.3589 ns | 0.0033 | 56 B |
| EmptyApiOperation | 85.834 ns | 6.257 ns | 0.3430 ns | 0.0224 | 376 B |
| EmptyApiParameter | 18.951 ns | 23.964 ns | 1.3135 ns | 0.0057 | 96 B |
| EmptyApiPathItem | 16.662 ns | 19.083 ns | 1.0460 ns | 0.0038 | 64 B |
| EmptyApiPaths | 63.937 ns | 18.114 ns | 0.9929 ns | 0.0148 | 248 B |
| EmptyApiRequestBody | 10.680 ns | 16.237 ns | 0.8900 ns | 0.0029 | 48 B |
| EmptyApiResponse | 13.962 ns | 34.919 ns | 1.9140 ns | 0.0033 | 56 B |
| EmptyApiResponses | 59.299 ns | 11.181 ns | 0.6129 ns | 0.0148 | 248 B |
| EmptyApiSchema | 22.670 ns | 30.835 ns | 1.6902 ns | 0.0244 | 408 B |
| EmptyApiSecurityRequirement | 16.913 ns | 2.287 ns | 0.1254 ns | 0.0062 | 104 B |
| EmptyApiSecurityScheme | 14.815 ns | 44.214 ns | 2.4235 ns | 0.0052 | 88 B |
| EmptyApiServer | 14.207 ns | 19.311 ns | 1.0585 ns | 0.0029 | 48 B |
| EmptyApiServerVariable | 13.801 ns | 35.161 ns | 1.9273 ns | 0.0029 | 48 B |
| EmptyApiTag | 8.223 ns | 4.013 ns | 0.2200 ns | 0.0029 | 48 B |
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|---------------------------- |-----------:|------------:|-----------:|-------:|-------:|----------:|
| EmptyApiCallback | 4.123 ns | 6.9458 ns | 0.3807 ns | 0.0051 | - | 32 B |
| EmptyApiComponents | 5.984 ns | 8.2812 ns | 0.4539 ns | 0.0166 | - | 104 B |
| EmptyApiContact | 4.247 ns | 2.0411 ns | 0.1119 ns | 0.0076 | - | 48 B |
| EmptyApiDiscriminator | 3.737 ns | 3.2849 ns | 0.1801 ns | 0.0064 | - | 40 B |
| EmptyDocument | 378.175 ns | 28.4604 ns | 1.5600 ns | 0.1807 | 0.0005 | 1136 B |
| EmptyApiEncoding | 3.957 ns | 0.4209 ns | 0.0231 ns | 0.0089 | - | 56 B |
| EmptyApiExample | 4.291 ns | 10.3278 ns | 0.5661 ns | 0.0089 | - | 56 B |
| EmptyApiExternalDocs | 13.830 ns | 3.4713 ns | 0.1903 ns | 0.0064 | - | 40 B |
| EmptyApiHeader | 5.588 ns | 0.2592 ns | 0.0142 ns | 0.0127 | - | 80 B |
| EmptyApiInfo | 20.057 ns | 15.6178 ns | 0.8561 ns | 0.0127 | - | 80 B |
| EmptyApiLicense | 15.371 ns | 2.4272 ns | 0.1330 ns | 0.0076 | - | 48 B |
| EmptyApiLink | 18.548 ns | 6.8904 ns | 0.3777 ns | 0.0115 | - | 72 B |
| EmptyApiMediaType | 12.316 ns | 75.4533 ns | 4.1359 ns | 0.0089 | - | 56 B |
| EmptyApiOAuthFlow | 7.727 ns | 3.5143 ns | 0.1926 ns | 0.0089 | - | 56 B |
| EmptyApiOAuthFlows | 4.888 ns | 5.8563 ns | 0.3210 ns | 0.0089 | - | 56 B |
| EmptyApiOperation | 52.321 ns | 22.6510 ns | 1.2416 ns | 0.0599 | - | 376 B |
| EmptyApiParameter | 5.761 ns | 10.3327 ns | 0.5664 ns | 0.0153 | - | 96 B |
| EmptyApiPathItem | 6.439 ns | 3.6625 ns | 0.2008 ns | 0.0102 | - | 64 B |
| EmptyApiPaths | 55.703 ns | 94.6718 ns | 5.1893 ns | 0.0395 | - | 248 B |
| EmptyApiRequestBody | 14.309 ns | 34.2430 ns | 1.8770 ns | 0.0076 | - | 48 B |
| EmptyApiResponse | 7.685 ns | 22.6218 ns | 1.2400 ns | 0.0089 | - | 56 B |
| EmptyApiResponses | 61.270 ns | 54.2391 ns | 2.9730 ns | 0.0395 | - | 248 B |
| EmptyApiSchema | 29.361 ns | 214.0627 ns | 11.7335 ns | 0.0650 | - | 408 B |
| EmptyApiSecurityRequirement | 14.933 ns | 50.1256 ns | 2.7476 ns | 0.0166 | - | 104 B |
| EmptyApiSecurityScheme | 13.589 ns | 53.0533 ns | 2.9080 ns | 0.0140 | - | 88 B |
| EmptyApiServer | 5.909 ns | 37.7061 ns | 2.0668 ns | 0.0076 | - | 48 B |
| EmptyApiServerVariable | 6.311 ns | 29.6268 ns | 1.6239 ns | 0.0076 | - | 48 B |
| EmptyApiTag | 6.111 ns | 35.5993 ns | 1.9513 ns | 0.0076 | - | 48 B |
Loading
Loading