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

Fix incorrect case sensitivity in FrozenDictionary and FrozenSet for some cases #93986

Conversation

andrewjsaid
Copy link
Contributor

@andrewjsaid andrewjsaid commented Oct 25, 2023

See linked issue #93974

I've fixed by adding new subclasses for these specific use-cases. Please review thoroughly.

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Oct 25, 2023
@ghost
Copy link

ghost commented Oct 25, 2023

Tagging subscribers to this area: @dotnet/area-system-collections
See info in area-owners.md if you want to be subscribed.

Issue Details

See linked issue #93974

This is just the set of failing tests.

Both suggestions in the linked issue have been attempted on my local and they both fix the tests, but I would like confirmation of which approach to go for.

Author: andrewjsaid
Assignees: -
Labels:

area-System.Collections, community-contribution

Milestone: -

@eiriktsarpalis
Copy link
Member

Based on the benchmarks that you shared, I would be inclined to say that adding a new class is the best way to go. I wouldn't expect this could regress frozen dictionary construction performance substantially. cc @adamsitnik @stephentoub

@andrewjsaid
Copy link
Contributor Author

andrewjsaid commented Oct 26, 2023

I get this benchmark. (using microbenchmarks from dotnet/performance#3432)

// * Summary *

BenchmarkDotNet v0.13.7-nightly.20230717.35, Windows 11 (10.0.22621.2428/22H2/2022Update/SunValley2)
AMD Ryzen 9 5950X, 1 CPU, 32 logical and 16 physical cores
.NET SDK 8.0.100-rc.1.23463.5
  [Host]     : .NET 8.0.0 (8.0.23.41904), X64 RyuJIT AVX2
  Job-VKUWJN : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2
  Job-XCQEGK : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2

PowerPlanMode=00000000-0000-0000-0000-000000000000  Arguments=/p:EnableUnsafeBinaryFormatterSerialization=true  IterationTime=250.0000 ms
MaxIterationCount=20  MinIterationCount=15  WarmupCount=1

|                             Method |        Job |                       ...   Toolchain | Count |         Mean |        Error |       StdDev |       Median |          Min |          Max | Ratio | RatioSD | Allocated | Alloc Ratio |
|----------------------------------- |----------- |-----------------------...------------ |------ |-------------:|-------------:|-------------:|-------------:|-------------:|-------------:|------:|--------:|----------:|------------:|
|  TryGetValue_True_FrozenDictionary | Job-VKUWJN | \dotnet-runtime-93974\...\corerun.exe |    10 |     39.58 ns |     1.018 ns |     1.132 ns |     39.54 ns |     38.25 ns |     41.96 ns |  0.99 |    0.03 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-XCQEGK |  \dotnet-runtime-main\...\corerun.exe |    10 |     39.99 ns |     0.731 ns |     0.610 ns |     40.13 ns |     39.17 ns |     41.29 ns |  1.00 |    0.00 |         - |          NA |
|                                    |            |                       ...             |       |              |              |              |              |              |              |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-VKUWJN | \dotnet-runtime-93974\...\corerun.exe |    10 |     38.27 ns |     1.816 ns |     2.092 ns |     37.10 ns |     35.91 ns |     42.36 ns |  1.11 |    0.06 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-XCQEGK |  \dotnet-runtime-main\...\corerun.exe |    10 |     34.53 ns |     0.151 ns |     0.126 ns |     34.58 ns |     34.19 ns |     34.67 ns |  1.00 |    0.00 |         - |          NA |
|                                    |            |                       ...             |       |              |              |              |              |              |              |       |         |           |             |
|  TryGetValue_True_FrozenDictionary | Job-VKUWJN | \dotnet-runtime-93974\...\corerun.exe |   100 |    389.33 ns |     7.461 ns |     6.614 ns |    388.01 ns |    380.56 ns |    406.03 ns |  1.00 |    0.02 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-XCQEGK |  \dotnet-runtime-main\...\corerun.exe |   100 |    388.41 ns |     6.606 ns |     5.516 ns |    386.74 ns |    378.74 ns |    397.53 ns |  1.00 |    0.00 |         - |          NA |
|                                    |            |                       ...             |       |              |              |              |              |              |              |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-VKUWJN | \dotnet-runtime-93974\...\corerun.exe |   100 |    353.29 ns |     7.337 ns |     7.850 ns |    349.74 ns |    344.52 ns |    369.30 ns |  0.98 |    0.05 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-XCQEGK |  \dotnet-runtime-main\...\corerun.exe |   100 |    359.74 ns |    12.581 ns |    14.488 ns |    356.16 ns |    338.65 ns |    384.92 ns |  1.00 |    0.00 |         - |          NA |
|                                    |            |                       ...             |       |              |              |              |              |              |              |       |         |           |             |
|  TryGetValue_True_FrozenDictionary | Job-VKUWJN | \dotnet-runtime-93974\...\corerun.exe |  1000 |  4,295.45 ns |   124.468 ns |   138.346 ns |  4,251.55 ns |  4,140.04 ns |  4,637.46 ns |  1.03 |    0.04 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-XCQEGK |  \dotnet-runtime-main\...\corerun.exe |  1000 |  4,173.11 ns |    44.718 ns |    37.342 ns |  4,174.17 ns |  4,121.28 ns |  4,245.44 ns |  1.00 |    0.00 |         - |          NA |
|                                    |            |                       ...             |       |              |              |              |              |              |              |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-VKUWJN | \dotnet-runtime-93974\...\corerun.exe |  1000 |  3,773.15 ns |    71.509 ns |    79.482 ns |  3,746.07 ns |  3,688.13 ns |  3,909.15 ns |  1.00 |    0.03 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-XCQEGK |  \dotnet-runtime-main\...\corerun.exe |  1000 |  3,752.28 ns |    69.273 ns |    64.798 ns |  3,727.66 ns |  3,678.24 ns |  3,891.33 ns |  1.00 |    0.00 |         - |          NA |
|                                    |            |                       ...             |       |              |              |              |              |              |              |       |         |           |             |
|  TryGetValue_True_FrozenDictionary | Job-VKUWJN | \dotnet-runtime-93974\...\corerun.exe | 10000 | 63,669.79 ns | 3,025.270 ns | 3,483.906 ns | 63,079.84 ns | 59,978.41 ns | 70,383.03 ns |  1.05 |    0.05 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-XCQEGK |  \dotnet-runtime-main\...\corerun.exe | 10000 | 59,950.22 ns |   928.710 ns |   868.716 ns | 59,604.69 ns | 58,849.34 ns | 61,858.79 ns |  1.00 |    0.00 |         - |          NA |
|                                    |            |                       ...             |       |              |              |              |              |              |              |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-VKUWJN | \dotnet-runtime-93974\...\corerun.exe | 10000 | 51,587.32 ns | 2,336.222 ns | 2,596.704 ns | 51,100.31 ns | 48,465.03 ns | 57,078.57 ns |  1.05 |    0.06 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-XCQEGK |  \dotnet-runtime-main\...\corerun.exe | 10000 | 49,635.53 ns | 1,126.593 ns | 1,156.929 ns | 49,362.88 ns | 48,029.83 ns | 51,787.24 ns |  1.00 |    0.00 |         - |          NA |

// * Warnings *
MultimodalDistribution
  Perf_SubstringFrozenDictionary.TryGetValue_False_FrozenDictionary: PowerPlanMode=00000000-0000-0000-0000-000000000000, Arguments=/p:EnableUnsafeBinaryFormatterSerialization=true, Toolchain=\dotnet-runtime-93974\artifacts\bin\testhost\net9.0-windows-Release-x64\shared\Microsoft.NETCore.App\9.0.0\corerun.exe, IterationTime=250.0000 ms, MaxIterationCount=20, MinIterationCount=15, WarmupCount=1 -> It seems that the distribution can have several modes (mValue = 2.83)

@danmoseley
Copy link
Member

Might this need backport to 8.0.1, as correctness?

@andrewjsaid
Copy link
Contributor Author

@danmoseley yes this is about correctness

@andrewjsaid andrewjsaid force-pushed the frozen-collections-ordinal-ignore-case branch from 15fb484 to ff89d40 Compare October 26, 2023 22:16
@andrewjsaid andrewjsaid force-pushed the frozen-collections-ordinal-ignore-case branch from ff89d40 to 328d9f1 Compare October 26, 2023 22:21
@eiriktsarpalis eiriktsarpalis self-assigned this Oct 30, 2023
@eiriktsarpalis eiriktsarpalis added this to the 8.0.1 milestone Oct 30, 2023
? new OrdinalStringFrozenDictionary_FullCaseInsensitiveAscii<TValue>(keys, values, stringComparer, analysis.MinimumLength, analysis.MaximumLengthDiff)
: new OrdinalStringFrozenDictionary_FullCaseInsensitive<TValue>(keys, values, stringComparer, analysis.MinimumLength, analysis.MaximumLengthDiff);
}
else
{
// if (IgnoreCase) => Can only be true if there are no letters, thus case sensitive comparison still works here.
Copy link
Member

@eiriktsarpalis eiriktsarpalis Nov 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an assertion that could replace this comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so because the assertion would just be re-calculating what the KeyAnalyzer does.

@@ -0,0 +1,29 @@
// Licensed to the .NET Foundation under one or more agreements.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following naming convention of other files already committed, shouldn't this be OrdinalStringFrozenDictionary_LeftJustifiedCaseInsensitiveSingleChar.cs?


namespace System.Collections.Frozen
{
internal sealed class OrdinalStringFrozenDictionary_LeftJustifiedSubstringCaseInsensitive<TValue> : OrdinalStringFrozenDictionary<TValue>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


namespace System.Collections.Frozen
{
internal sealed class OrdinalStringFrozenDictionary_RightJustifiedSubstringCaseInsensitive<TValue> : OrdinalStringFrozenDictionary<TValue>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


namespace System.Collections.Frozen
{
internal sealed class OrdinalStringFrozenSet_LeftJustifiedSubstringCaseInsensitive : OrdinalStringFrozenSet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


namespace System.Collections.Frozen
{
internal sealed class OrdinalStringFrozenSet_RightJustifiedSubstringCaseInsensitive : OrdinalStringFrozenSet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@eiriktsarpalis eiriktsarpalis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seem to be a few implementations being duplicated. Renaming the types to follow existing naming conventions should result in the those conflicts being identified.

@andrewjsaid
Copy link
Contributor Author

@eiriktsarpalis The files named differently are implemented differently. The difference is in whether the hash is case insensitive or both the hash and the equality are case insensitive. Previously the equality was always case sensitive which is the bug being fixed.

I'm very happy to take suggestions for better naming.

Existing types which aren't relevant to this PR:

OrdinalStringFrozenDictionary
OrdinalStringFrozenDictionary_Full
OrdinalStringFrozenDictionary_FullCaseInsensitive
OrdinalStringFrozenDictionary_FullCaseInsensitiveAscii
OrdinalStringFrozenDictionary_LeftJustifiedCaseInsensitiveAsciiSubstring
OrdinalStringFrozenDictionary_RightJustifiedCaseInsensitiveAsciiSubstring
OrdinalStringFrozenDictionary_LeftJustifiedCaseInsensitiveSubstring // <-- note this is case insensitive both hash and equality
OrdinalStringFrozenDictionary_RightJustifiedCaseInsensitiveSubstring // <-- note this is case insensitive both hash and equality

Existing types which are being used incorrectly: these do case sensitive hash and case sensitive equality.

OrdinalStringFrozenDictionary_LeftJustifiedSingleChar
OrdinalStringFrozenDictionary_LeftJustifiedSubstring
OrdinalStringFrozenDictionary_RightJustifiedSingleChar
OrdinalStringFrozenDictionary_RightJustifiedSubstring

New types in this PR: these do case sensitive hash and case insensitive equality which is the bug fix, really.

OrdinalStringFrozenDictionary_RightJustifiedSubstringCaseInsensitive
OrdinalStringFrozenDictionary_RightJustifiedSingleCharCaseInsensitive
OrdinalStringFrozenDictionary_LeftJustifiedSingleCharCaseInsensitive
OrdinalStringFrozenDictionary_LeftJustifiedSubstringCaseInsensitive

If this is too confusing and too niche and will have drawbacks with AOT trimming then I'm happy to entirely remove the optimization too to give time to rethink it for .NET 9.

@eiriktsarpalis
Copy link
Member

eiriktsarpalis commented Nov 9, 2023

If this is too confusing and too niche and will have drawbacks with AOT trimming then I'm happy to entirely remove the optimization too to give time to rethink it for .NET 9.

Given this is a .NET 8 backport candidate let's try to fix the functional issue with a minimal diff, even if it does regress perf. How does performance compare between string.Equals(x, y, StringComparison) and StringComparison.Equals() approaches?

@andrewjsaid
Copy link
Contributor Author

andrewjsaid commented Nov 10, 2023

I have now added 2 more implementations to my benchmark and upped my .NET Binaries footprint to 80GB 😱

Removing the optimization will be a regression (haven't got a measurement*) only in the case where we are case insensitive, have identified a partial substring to hash, and that substring contains no letters. In all other cases it matches .NET 8 release. * There aren't any benchmarks for case insensitive frozen dictionaries and I don't have the time to add some. However the regression is simply using a case insensitive hash of up to 8 characters so it's probably not significant.

StringComparer has a performance regression for most stringly keyed frozen dictionaries whether case sensitive or not. StringComparison has the same problem and performs slower.

The current state of this PR (specialized classes) represents no performance regression however is somewhat harder to reason about and adds more code which might represent a regression in static footprint as I understand it (?).

Actual benchmark results below. I am inclined to simplify and just remove the buggy optimization because:

  1. it is low complexity and
  2. it impacts niche scenarios and
  3. the impact for those scenarios is limited to the performance increase from hashing 8 characters case sensitively to case insensitively and
  4. it's probably the smallest diff as it is contained to KeyAnalyzer besides test code.

Thoughts?

Perf_DefaultFrozenDictionary

// * Summary *

BenchmarkDotNet v0.13.7-nightly.20230717.35, Windows 11 (10.0.22621.2428/22H2/2022Update/SunValley2)
AMD Ryzen 9 5950X, 1 CPU, 32 logical and 16 physical cores
.NET SDK 8.0.100-rc.2.23502.2
  [Host]     : .NET 8.0.0 (8.0.23.47906), X64 RyuJIT AVX2
  Job-FODOIH : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2
  Job-CEDCLT : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2
  Job-SZUZFO : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2
  Job-ZEUSZJ : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2
  Job-WNQNIB : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2

PowerPlanMode=00000000-0000-0000-0000-000000000000  Arguments=/p:EnableUnsafeBinaryFormatterSerialization=true  IterationTime=250.0000 ms  
MaxIterationCount=20  MinIterationCount=15  WarmupCount=1  

|                             Method |        Job |                          ...   Toolchain | Count |          Mean |        Error |       StdDev |        Median |           Min |           Max | Ratio | RatioSD | Allocated | Alloc Ratio |
|----------------------------------- |----------- |--------------------------...------------ |------ |--------------:|-------------:|-------------:|--------------:|--------------:|--------------:|------:|--------:|----------:|------------:|
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |    10 |      24.69 ns |     0.270 ns |     0.253 ns |      24.73 ns |      24.11 ns |      25.04 ns |  1.01 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |    10 |      37.94 ns |     0.251 ns |     0.235 ns |      37.87 ns |      37.60 ns |      38.44 ns |  1.55 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |    10 |      28.53 ns |     0.260 ns |     0.243 ns |      28.53 ns |      28.00 ns |      28.99 ns |  1.16 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |    10 |      24.54 ns |     0.164 ns |     0.146 ns |      24.59 ns |      24.26 ns |      24.81 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |    10 |      24.55 ns |     0.156 ns |     0.146 ns |      24.54 ns |      24.24 ns |      24.87 ns |  1.00 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |               |              |              |               |               |               |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |    10 |      21.24 ns |     0.111 ns |     0.098 ns |      21.24 ns |      21.12 ns |      21.40 ns |  0.94 |    0.04 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |    10 |      25.58 ns |     0.197 ns |     0.165 ns |      25.51 ns |      25.39 ns |      25.94 ns |  1.13 |    0.05 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |    10 |      21.85 ns |     0.131 ns |     0.123 ns |      21.86 ns |      21.55 ns |      22.03 ns |  0.96 |    0.04 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |    10 |      22.72 ns |     0.895 ns |     1.030 ns |      22.74 ns |      21.27 ns |      24.71 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |    10 |      23.90 ns |     0.821 ns |     0.946 ns |      23.98 ns |      22.07 ns |      25.53 ns |  1.05 |    0.06 |         - |          NA |
|                                    |            |                          ...             |       |               |              |              |               |               |               |       |         |           |             |
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |   100 |     766.03 ns |     7.188 ns |     6.724 ns |     766.08 ns |     756.42 ns |     778.98 ns |  0.99 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |   100 |     772.32 ns |     6.870 ns |     6.426 ns |     773.81 ns |     757.46 ns |     780.33 ns |  1.00 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |   100 |     758.11 ns |     4.792 ns |     4.482 ns |     756.73 ns |     751.42 ns |     767.38 ns |  0.98 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |   100 |     771.51 ns |     7.707 ns |     7.210 ns |     774.66 ns |     758.58 ns |     779.84 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |   100 |     765.84 ns |     3.757 ns |     3.331 ns |     766.51 ns |     760.03 ns |     770.87 ns |  0.99 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |               |              |              |               |               |               |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |   100 |     658.86 ns |     5.973 ns |     5.587 ns |     657.64 ns |     651.80 ns |     668.27 ns |  0.98 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |   100 |     660.65 ns |     3.603 ns |     3.194 ns |     660.76 ns |     655.92 ns |     667.38 ns |  0.99 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |   100 |     667.19 ns |     1.334 ns |     1.183 ns |     667.13 ns |     664.89 ns |     669.06 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |   100 |     669.67 ns |     3.983 ns |     3.530 ns |     669.54 ns |     663.23 ns |     675.59 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |   100 |     657.93 ns |     3.146 ns |     2.943 ns |     657.88 ns |     651.38 ns |     663.39 ns |  0.98 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |               |              |              |               |               |               |       |         |           |             |
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |  1000 |   7,964.38 ns |    25.604 ns |    23.950 ns |   7,970.21 ns |   7,921.74 ns |   8,010.66 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |  1000 |   8,036.72 ns |    50.659 ns |    44.908 ns |   8,043.51 ns |   7,941.55 ns |   8,114.43 ns |  1.01 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |  1000 |   7,958.60 ns |    26.468 ns |    24.758 ns |   7,969.45 ns |   7,911.75 ns |   7,989.00 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |  1000 |   7,971.81 ns |    15.525 ns |    14.522 ns |   7,973.37 ns |   7,946.11 ns |   7,999.61 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |  1000 |   7,852.82 ns |    16.415 ns |    13.707 ns |   7,853.11 ns |   7,824.56 ns |   7,875.34 ns |  0.98 |    0.00 |         - |          NA |
|                                    |            |                          ...             |       |               |              |              |               |               |               |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |  1000 |   7,437.51 ns |    25.381 ns |    21.194 ns |   7,439.70 ns |   7,393.96 ns |   7,480.44 ns |  1.01 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |  1000 |   7,494.97 ns |    67.364 ns |    63.012 ns |   7,511.02 ns |   7,386.91 ns |   7,604.39 ns |  1.01 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |  1000 |   7,487.87 ns |    19.276 ns |    18.031 ns |   7,489.42 ns |   7,455.36 ns |   7,514.11 ns |  1.01 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |  1000 |   7,402.20 ns |    40.777 ns |    38.143 ns |   7,400.71 ns |   7,342.98 ns |   7,484.01 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |  1000 |   7,336.97 ns |    22.089 ns |    18.445 ns |   7,337.01 ns |   7,307.64 ns |   7,376.76 ns |  0.99 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |               |              |              |               |               |               |       |         |           |             |
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe | 10000 | 162,729.12 ns |   634.771 ns |   593.765 ns | 162,836.34 ns | 161,629.64 ns | 163,519.27 ns |  0.97 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe | 10000 | 162,042.90 ns |   642.601 ns |   601.089 ns | 161,875.84 ns | 161,274.36 ns | 163,403.99 ns |  0.97 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe | 10000 | 164,517.17 ns | 1,251.150 ns | 1,170.326 ns | 164,297.23 ns | 161,875.45 ns | 166,761.73 ns |  0.98 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe | 10000 | 167,193.63 ns | 1,070.464 ns | 1,001.312 ns | 167,422.27 ns | 164,276.86 ns | 168,262.83 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe | 10000 | 162,867.20 ns | 1,035.649 ns |   918.076 ns | 162,827.28 ns | 161,409.83 ns | 164,424.61 ns |  0.97 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |               |              |              |               |               |               |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe | 10000 | 127,425.31 ns |   718.674 ns |   637.086 ns | 127,441.59 ns | 126,507.06 ns | 129,007.77 ns |  0.91 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe | 10000 | 128,549.73 ns |   840.023 ns |   701.457 ns | 128,608.45 ns | 127,492.21 ns | 129,791.85 ns |  0.92 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe | 10000 | 127,404.21 ns |   346.036 ns |   323.682 ns | 127,377.54 ns | 126,891.01 ns | 128,155.69 ns |  0.91 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe | 10000 | 140,271.73 ns |   721.706 ns |   639.774 ns | 140,335.80 ns | 139,247.94 ns | 141,381.75 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe | 10000 | 138,129.50 ns |   565.176 ns |   501.013 ns | 138,196.35 ns | 136,736.45 ns | 138,908.90 ns |  0.98 |    0.00 |         - |          NA |

Perf_LengthBucketsFrozenDictionary

// * Summary *

BenchmarkDotNet v0.13.7-nightly.20230717.35, Windows 11 (10.0.22621.2428/22H2/2022Update/SunValley2)
AMD Ryzen 9 5950X, 1 CPU, 32 logical and 16 physical cores
.NET SDK 8.0.100-rc.2.23502.2
  [Host]     : .NET 8.0.0 (8.0.23.47906), X64 RyuJIT AVX2
  Job-FODOIH : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2
  Job-CEDCLT : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2
  Job-SZUZFO : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2
  Job-ZEUSZJ : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2
  Job-WNQNIB : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2

PowerPlanMode=00000000-0000-0000-0000-000000000000  Arguments=/p:EnableUnsafeBinaryFormatterSerialization=true  IterationTime=250.0000 ms  
MaxIterationCount=20  MinIterationCount=15  WarmupCount=1  

|                             Method |        Job |                          ...   Toolchain | Count | ItemsPerBucket |           Mean |         Error |        StdDev |         Median |            Min |            Max | Ratio | RatioSD | Allocated | Alloc Ratio |
|----------------------------------- |----------- |--------------------------...------------ |------ |--------------- |---------------:|--------------:|--------------:|---------------:|---------------:|---------------:|------:|--------:|----------:|------------:|
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |    10 |              1 |      17.179 ns |     0.0841 ns |     0.0787 ns |      17.200 ns |      16.993 ns |      17.309 ns |  1.01 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |    10 |              1 |      17.088 ns |     0.1007 ns |     0.0942 ns |      17.103 ns |      16.893 ns |      17.237 ns |  1.01 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |    10 |              1 |      17.577 ns |     0.0909 ns |     0.0759 ns |      17.586 ns |      17.409 ns |      17.735 ns |  1.04 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |    10 |              1 |      16.955 ns |     0.1450 ns |     0.1356 ns |      16.991 ns |      16.753 ns |      17.205 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |    10 |              1 |      17.446 ns |     0.0844 ns |     0.0748 ns |      17.468 ns |      17.228 ns |      17.530 ns |  1.03 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |                |                |               |               |                |                |                |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |    10 |              1 |       9.183 ns |     0.0505 ns |     0.0473 ns |       9.180 ns |       9.085 ns |       9.245 ns |  1.08 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |    10 |              1 |       8.450 ns |     0.1305 ns |     0.1221 ns |       8.482 ns |       8.212 ns |       8.667 ns |  1.00 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |    10 |              1 |       8.381 ns |     0.0714 ns |     0.0597 ns |       8.395 ns |       8.254 ns |       8.445 ns |  0.99 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |    10 |              1 |       8.488 ns |     0.0311 ns |     0.0291 ns |       8.483 ns |       8.451 ns |       8.544 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |    10 |              1 |       8.414 ns |     0.0477 ns |     0.0398 ns |       8.429 ns |       8.317 ns |       8.451 ns |  0.99 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |                |                |               |               |                |                |                |       |         |           |             |
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |    10 |              5 |      55.897 ns |     0.3208 ns |     0.2679 ns |      55.871 ns |      55.548 ns |      56.578 ns |  1.00 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |    10 |              5 |      57.974 ns |     0.2514 ns |     0.1963 ns |      58.011 ns |      57.706 ns |      58.275 ns |  1.04 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |    10 |              5 |      56.261 ns |     0.5051 ns |     0.4724 ns |      56.407 ns |      55.142 ns |      56.694 ns |  1.01 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |    10 |              5 |      55.651 ns |     0.4661 ns |     0.4360 ns |      55.765 ns |      54.953 ns |      56.151 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |    10 |              5 |      57.662 ns |     0.5396 ns |     0.5048 ns |      57.678 ns |      56.686 ns |      58.393 ns |  1.04 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |                |                |               |               |                |                |                |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |    10 |              5 |       8.517 ns |     0.0799 ns |     0.0667 ns |       8.499 ns |       8.453 ns |       8.667 ns |  0.99 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |    10 |              5 |       8.500 ns |     0.0498 ns |     0.0442 ns |       8.493 ns |       8.406 ns |       8.580 ns |  0.99 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |    10 |              5 |       8.338 ns |     0.1474 ns |     0.1379 ns |       8.375 ns |       8.038 ns |       8.487 ns |  0.97 |    0.02 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |    10 |              5 |       8.559 ns |     0.0863 ns |     0.0807 ns |       8.516 ns |       8.468 ns |       8.696 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |    10 |              5 |       8.574 ns |     0.1001 ns |     0.0936 ns |       8.570 ns |       8.421 ns |       8.715 ns |  1.00 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |                |                |               |               |                |                |                |       |         |           |             |
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |   100 |              1 |     155.169 ns |     1.4586 ns |     1.3644 ns |     154.914 ns |     153.128 ns |     157.186 ns |  0.99 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |   100 |              1 |     154.641 ns |     0.9818 ns |     0.9184 ns |     154.213 ns |     153.445 ns |     156.335 ns |  0.99 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |   100 |              1 |     155.740 ns |     1.6272 ns |     1.5221 ns |     155.009 ns |     153.914 ns |     158.930 ns |  1.00 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |   100 |              1 |     156.323 ns |     1.2629 ns |     1.0546 ns |     156.538 ns |     154.046 ns |     158.136 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |   100 |              1 |     153.824 ns |     0.5875 ns |     0.4906 ns |     153.787 ns |     153.237 ns |     154.905 ns |  0.98 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |                |                |               |               |                |                |                |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |   100 |              1 |      77.377 ns |     0.2081 ns |     0.1738 ns |      77.389 ns |      77.095 ns |      77.712 ns |  0.99 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |   100 |              1 |      74.734 ns |     0.4975 ns |     0.4653 ns |      74.572 ns |      74.172 ns |      75.735 ns |  0.96 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |   100 |              1 |      75.376 ns |     0.2371 ns |     0.2102 ns |      75.414 ns |      74.985 ns |      75.683 ns |  0.97 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |   100 |              1 |      77.800 ns |     0.3307 ns |     0.2762 ns |      77.868 ns |      77.288 ns |      78.352 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |   100 |              1 |      77.913 ns |     0.4844 ns |     0.4294 ns |      77.700 ns |      77.494 ns |      78.864 ns |  1.00 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |                |                |               |               |                |                |                |       |         |           |             |
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |   100 |              5 |     631.165 ns |    15.2907 ns |    17.6088 ns |     630.588 ns |     609.167 ns |     662.882 ns |  0.94 |    0.04 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |   100 |              5 |     682.138 ns |    14.7349 ns |    16.9687 ns |     685.530 ns |     659.461 ns |     706.136 ns |  1.02 |    0.04 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |   100 |              5 |     653.718 ns |    13.6819 ns |    15.7561 ns |     662.676 ns |     628.149 ns |     670.681 ns |  0.97 |    0.04 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |   100 |              5 |     672.132 ns |    16.3777 ns |    18.8605 ns |     661.876 ns |     654.441 ns |     704.326 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |   100 |              5 |     644.736 ns |    12.5733 ns |    11.7611 ns |     649.351 ns |     624.735 ns |     659.388 ns |  0.96 |    0.04 |         - |          NA |
|                                    |            |                          ...             |       |                |                |               |               |                |                |                |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |   100 |              5 |      78.042 ns |     0.6558 ns |     0.6134 ns |      78.000 ns |      77.116 ns |      79.053 ns |  1.00 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |   100 |              5 |      75.309 ns |     0.2372 ns |     0.2219 ns |      75.240 ns |      75.026 ns |      75.708 ns |  0.97 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |   100 |              5 |      75.625 ns |     0.6780 ns |     0.6342 ns |      75.386 ns |      74.503 ns |      76.701 ns |  0.97 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |   100 |              5 |      77.976 ns |     0.2725 ns |     0.2416 ns |      77.929 ns |      77.662 ns |      78.377 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |   100 |              5 |      78.385 ns |     0.4207 ns |     0.3935 ns |      78.512 ns |      77.434 ns |      78.816 ns |  1.00 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |                |                |               |               |                |                |                |       |         |           |             |
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |  1000 |              1 |   1,837.342 ns |     5.0134 ns |     4.1865 ns |   1,836.043 ns |   1,830.920 ns |   1,846.967 ns |  0.99 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |  1000 |              1 |   1,849.050 ns |    10.8646 ns |    10.1628 ns |   1,849.148 ns |   1,825.726 ns |   1,861.783 ns |  1.00 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |  1000 |              1 |   1,855.441 ns |    16.2428 ns |    15.1935 ns |   1,856.134 ns |   1,833.247 ns |   1,878.887 ns |  1.00 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |  1000 |              1 |   1,849.307 ns |    15.6267 ns |    14.6172 ns |   1,854.958 ns |   1,826.190 ns |   1,868.925 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |  1000 |              1 |   1,849.242 ns |    14.2081 ns |    13.2903 ns |   1,852.838 ns |   1,829.579 ns |   1,873.257 ns |  1.00 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |                |                |               |               |                |                |                |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |  1000 |              1 |     894.487 ns |     3.3196 ns |     2.9427 ns |     894.617 ns |     888.838 ns |     899.345 ns |  0.98 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |  1000 |              1 |     903.052 ns |     2.3147 ns |     2.0519 ns |     903.199 ns |     900.202 ns |     905.864 ns |  0.99 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |  1000 |              1 |     903.259 ns |     4.9368 ns |     4.6179 ns |     902.126 ns |     896.917 ns |     912.907 ns |  0.99 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |  1000 |              1 |     914.246 ns |     2.8324 ns |     2.5108 ns |     915.378 ns |     907.708 ns |     917.083 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |  1000 |              1 |     909.124 ns |     6.5862 ns |     6.1608 ns |     911.375 ns |     895.343 ns |     915.810 ns |  0.99 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |                |                |               |               |                |                |                |       |         |           |             |
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |  1000 |              5 |   6,581.967 ns |   129.5498 ns |   138.6169 ns |   6,580.370 ns |   6,359.229 ns |   6,842.020 ns |  1.03 |    0.05 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |  1000 |              5 |   6,266.220 ns |   121.9801 ns |   119.8008 ns |   6,319.575 ns |   5,933.066 ns |   6,362.076 ns |  0.98 |    0.04 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |  1000 |              5 |   6,113.670 ns |   146.2493 ns |   168.4209 ns |   6,154.134 ns |   5,816.469 ns |   6,364.233 ns |  0.96 |    0.04 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |  1000 |              5 |   6,361.668 ns |   233.4848 ns |   268.8814 ns |   6,259.935 ns |   6,086.421 ns |   6,805.446 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |  1000 |              5 |   6,207.242 ns |    28.2028 ns |    23.5506 ns |   6,206.428 ns |   6,170.214 ns |   6,237.714 ns |  0.98 |    0.04 |         - |          NA |
|                                    |            |                          ...             |       |                |                |               |               |                |                |                |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |  1000 |              5 |     806.367 ns |     3.7759 ns |     3.1530 ns |     806.170 ns |     802.264 ns |     811.761 ns |  0.99 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |  1000 |              5 |     838.084 ns |     3.1097 ns |     2.7567 ns |     838.582 ns |     833.579 ns |     842.089 ns |  1.03 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |  1000 |              5 |     835.334 ns |     3.7375 ns |     3.3132 ns |     835.794 ns |     827.968 ns |     839.676 ns |  1.02 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |  1000 |              5 |     816.003 ns |     7.2478 ns |     6.4250 ns |     818.007 ns |     803.444 ns |     826.060 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |  1000 |              5 |     813.950 ns |     5.5019 ns |     5.1465 ns |     814.173 ns |     806.932 ns |     823.045 ns |  1.00 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |                |                |               |               |                |                |                |       |         |           |             |
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe | 10000 |              1 |  41,369.394 ns |   603.3894 ns |   564.4108 ns |  41,515.972 ns |  40,540.460 ns |  42,201.240 ns |  1.02 |    0.02 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe | 10000 |              1 |  41,186.085 ns |   327.5642 ns |   306.4037 ns |  41,254.390 ns |  40,670.333 ns |  41,538.838 ns |  1.02 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe | 10000 |              1 |  40,795.370 ns |   136.1556 ns |   127.3600 ns |  40,787.290 ns |  40,514.939 ns |  40,984.270 ns |  1.01 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe | 10000 |              1 |  40,490.683 ns |   285.6648 ns |   253.2344 ns |  40,466.373 ns |  40,227.648 ns |  41,124.326 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe | 10000 |              1 |  40,892.824 ns |   355.5251 ns |   332.5584 ns |  40,860.374 ns |  40,303.721 ns |  41,458.070 ns |  1.01 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |                |                |               |               |                |                |                |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe | 10000 |              1 |  24,082.298 ns |   399.0237 ns |   373.2470 ns |  24,134.763 ns |  23,556.987 ns |  24,802.240 ns |  1.02 |    0.02 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe | 10000 |              1 |  24,238.319 ns |   481.9134 ns |   494.8896 ns |  24,069.466 ns |  23,661.578 ns |  25,298.724 ns |  1.03 |    0.02 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe | 10000 |              1 |  23,960.931 ns |   121.0831 ns |   113.2612 ns |  23,962.047 ns |  23,766.798 ns |  24,119.016 ns |  1.01 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe | 10000 |              1 |  23,632.215 ns |   171.8724 ns |   152.3604 ns |  23,678.163 ns |  23,427.213 ns |  23,904.055 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe | 10000 |              1 |  24,166.562 ns |   275.5864 ns |   257.7837 ns |  24,145.362 ns |  23,691.009 ns |  24,497.269 ns |  1.02 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |                |                |               |               |                |                |                |       |         |           |             |
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe | 10000 |              5 | 105,190.960 ns |   886.4704 ns |   785.8329 ns | 104,952.407 ns | 103,966.512 ns | 107,177.069 ns |  1.00 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe | 10000 |              5 | 103,636.628 ns |   636.8012 ns |   595.6642 ns | 103,684.478 ns | 102,595.488 ns | 104,831.995 ns |  0.99 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe | 10000 |              5 | 104,939.442 ns |   887.4207 ns |   786.6753 ns | 105,150.650 ns | 102,754.530 ns | 105,671.560 ns |  1.00 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe | 10000 |              5 | 104,670.445 ns |   785.1154 ns |   734.3974 ns | 104,498.860 ns | 103,106.588 ns | 105,695.228 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe | 10000 |              5 | 104,897.606 ns | 1,482.3988 ns | 1,386.6368 ns | 104,614.333 ns | 102,892.958 ns | 107,053.833 ns |  1.00 |    0.02 |         - |          NA |
|                                    |            |                          ...             |       |                |                |               |               |                |                |                |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe | 10000 |              5 |  19,703.460 ns |   124.5911 ns |   110.4467 ns |  19,703.141 ns |  19,510.459 ns |  19,884.367 ns |  1.01 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe | 10000 |              5 |  19,820.239 ns |    73.6256 ns |    61.4807 ns |  19,819.792 ns |  19,720.468 ns |  19,937.293 ns |  1.02 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe | 10000 |              5 |  19,605.454 ns |   201.0435 ns |   188.0562 ns |  19,681.550 ns |  19,327.863 ns |  19,948.822 ns |  1.01 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe | 10000 |              5 |  19,433.609 ns |   148.1254 ns |   138.5566 ns |  19,423.524 ns |  19,225.821 ns |  19,718.545 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe | 10000 |              5 |  19,960.836 ns |   222.3710 ns |   197.1261 ns |  20,019.493 ns |  19,562.436 ns |  20,172.503 ns |  1.03 |    0.01 |         - |          NA |

Perf_SingleCharFrozenDictionary

// * Summary *

BenchmarkDotNet v0.13.7-nightly.20230717.35, Windows 11 (10.0.22621.2428/22H2/2022Update/SunValley2)
AMD Ryzen 9 5950X, 1 CPU, 32 logical and 16 physical cores
.NET SDK 8.0.100-rc.2.23502.2
  [Host]     : .NET 8.0.0 (8.0.23.47906), X64 RyuJIT AVX2
  Job-FODOIH : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2
  Job-CEDCLT : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2
  Job-SZUZFO : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2
  Job-ZEUSZJ : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2
  Job-WNQNIB : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2

PowerPlanMode=00000000-0000-0000-0000-000000000000  Arguments=/p:EnableUnsafeBinaryFormatterSerialization=true  IterationTime=250.0000 ms  
MaxIterationCount=20  MinIterationCount=15  WarmupCount=1  

|                             Method |        Job |                          ...   Toolchain | Count |         Mean |      Error |     StdDev |       Median |          Min |          Max | Ratio | RatioSD | Allocated | Alloc Ratio |
|----------------------------------- |----------- |--------------------------...------------ |------ |-------------:|-----------:|-----------:|-------------:|-------------:|-------------:|------:|--------:|----------:|------------:|
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |    10 |     24.66 ns |   0.169 ns |   0.141 ns |     24.64 ns |     24.44 ns |     24.99 ns |  1.01 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |    10 |     37.10 ns |   0.364 ns |   0.340 ns |     37.20 ns |     36.47 ns |     37.46 ns |  1.52 |    0.03 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |    10 |     27.69 ns |   0.202 ns |   0.189 ns |     27.75 ns |     27.29 ns |     27.97 ns |  1.13 |    0.02 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |    10 |     24.45 ns |   0.319 ns |   0.298 ns |     24.41 ns |     23.99 ns |     25.00 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |    10 |     24.33 ns |   0.236 ns |   0.209 ns |     24.39 ns |     23.92 ns |     24.61 ns |  1.00 |    0.02 |         - |          NA |
|                                    |            |                          ...             |       |              |            |            |              |              |              |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |    10 |     20.26 ns |   0.202 ns |   0.189 ns |     20.30 ns |     20.00 ns |     20.63 ns |  1.00 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |    10 |     19.41 ns |   0.238 ns |   0.222 ns |     19.43 ns |     19.13 ns |     19.97 ns |  0.96 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |    10 |     19.33 ns |   0.079 ns |   0.074 ns |     19.32 ns |     19.18 ns |     19.45 ns |  0.95 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |    10 |     20.26 ns |   0.139 ns |   0.123 ns |     20.27 ns |     20.07 ns |     20.53 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |    10 |     19.74 ns |   0.112 ns |   0.100 ns |     19.78 ns |     19.53 ns |     19.86 ns |  0.97 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |              |            |            |              |              |              |       |         |           |             |
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |   100 |    231.78 ns |   1.910 ns |   1.787 ns |    231.99 ns |    228.65 ns |    234.79 ns |  1.01 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |   100 |    368.69 ns |   4.203 ns |   3.932 ns |    366.15 ns |    364.10 ns |    374.77 ns |  1.61 |    0.02 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |   100 |    272.47 ns |   0.784 ns |   0.655 ns |    272.25 ns |    271.21 ns |    273.65 ns |  1.19 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |   100 |    228.85 ns |   0.844 ns |   0.704 ns |    228.87 ns |    227.50 ns |    230.42 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |   100 |    229.03 ns |   1.264 ns |   1.183 ns |    228.56 ns |    227.74 ns |    231.67 ns |  1.00 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |              |            |            |              |              |              |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |   100 |    186.46 ns |   1.189 ns |   1.112 ns |    186.48 ns |    184.47 ns |    188.59 ns |  1.01 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |   100 |    192.94 ns |   0.860 ns |   0.718 ns |    193.05 ns |    191.44 ns |    193.91 ns |  1.05 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |   100 |    191.69 ns |   0.899 ns |   0.841 ns |    191.41 ns |    190.54 ns |    193.25 ns |  1.04 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |   100 |    183.86 ns |   0.370 ns |   0.346 ns |    183.79 ns |    183.29 ns |    184.41 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |   100 |    191.96 ns |   1.417 ns |   1.325 ns |    192.34 ns |    189.17 ns |    193.41 ns |  1.04 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |              |            |            |              |              |              |       |         |           |             |
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |  1000 |  2,257.77 ns |   3.656 ns |   3.241 ns |  2,258.76 ns |  2,252.73 ns |  2,262.85 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |  1000 |  3,661.70 ns |  24.210 ns |  22.647 ns |  3,664.40 ns |  3,598.93 ns |  3,688.25 ns |  1.61 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |  1000 |  2,652.75 ns |   9.428 ns |   8.819 ns |  2,651.29 ns |  2,631.11 ns |  2,665.93 ns |  1.17 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |  1000 |  2,268.57 ns |   7.729 ns |   6.034 ns |  2,269.47 ns |  2,258.21 ns |  2,278.12 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |  1000 |  2,295.16 ns |  11.582 ns |  10.834 ns |  2,293.62 ns |  2,278.98 ns |  2,314.35 ns |  1.01 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |              |            |            |              |              |              |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |  1000 |  1,817.27 ns |  10.340 ns |   9.672 ns |  1,818.90 ns |  1,802.80 ns |  1,832.52 ns |  0.98 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |  1000 |  1,835.71 ns |  10.163 ns |   9.009 ns |  1,837.74 ns |  1,821.55 ns |  1,848.64 ns |  0.99 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |  1000 |  1,797.84 ns |   8.134 ns |   7.211 ns |  1,797.90 ns |  1,785.64 ns |  1,808.78 ns |  0.97 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |  1000 |  1,853.90 ns |   5.868 ns |   5.489 ns |  1,850.76 ns |  1,848.33 ns |  1,866.48 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |  1000 |  1,923.56 ns |   8.906 ns |   7.895 ns |  1,923.44 ns |  1,908.26 ns |  1,933.97 ns |  1.04 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |              |            |            |              |              |              |       |         |           |             |
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe | 10000 | 23,075.45 ns | 185.295 ns | 154.730 ns | 23,080.64 ns | 22,711.78 ns | 23,271.82 ns |  0.99 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe | 10000 | 36,879.15 ns | 378.136 ns | 353.709 ns | 36,873.65 ns | 36,127.81 ns | 37,264.48 ns |  1.58 |    0.02 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe | 10000 | 26,937.80 ns | 226.283 ns | 211.665 ns | 26,873.67 ns | 26,658.95 ns | 27,278.82 ns |  1.16 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe | 10000 | 23,293.47 ns |  98.931 ns |  92.540 ns | 23,308.29 ns | 23,164.68 ns | 23,496.65 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe | 10000 | 23,248.36 ns |  97.969 ns |  91.640 ns | 23,248.60 ns | 23,093.00 ns | 23,455.21 ns |  1.00 |    0.00 |         - |          NA |
|                                    |            |                          ...             |       |              |            |            |              |              |              |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe | 10000 | 19,165.55 ns | 202.614 ns | 189.525 ns | 19,289.46 ns | 18,898.11 ns | 19,358.11 ns |  1.00 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe | 10000 | 18,552.74 ns | 145.599 ns | 136.194 ns | 18,596.38 ns | 18,107.31 ns | 18,675.40 ns |  0.97 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe | 10000 | 18,933.97 ns | 177.606 ns | 166.133 ns | 18,854.73 ns | 18,745.42 ns | 19,256.81 ns |  0.99 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe | 10000 | 19,102.93 ns | 193.011 ns | 171.100 ns | 19,160.64 ns | 18,823.65 ns | 19,306.37 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe | 10000 | 19,085.45 ns | 151.364 ns | 141.586 ns | 19,107.09 ns | 18,858.40 ns | 19,408.84 ns |  1.00 |    0.01 |         - |          NA |

Perf_SubstringFrozenDictionary

// * Summary *

BenchmarkDotNet v0.13.7-nightly.20230717.35, Windows 11 (10.0.22621.2428/22H2/2022Update/SunValley2)
AMD Ryzen 9 5950X, 1 CPU, 32 logical and 16 physical cores
.NET SDK 8.0.100-rc.2.23502.2
  [Host]     : .NET 8.0.0 (8.0.23.47906), X64 RyuJIT AVX2
  Job-FODOIH : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2
  Job-CEDCLT : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2
  Job-SZUZFO : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2
  Job-ZEUSZJ : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2
  Job-WNQNIB : .NET 9.0.0 (42.42.42.42424), X64 RyuJIT AVX2

PowerPlanMode=00000000-0000-0000-0000-000000000000  Arguments=/p:EnableUnsafeBinaryFormatterSerialization=true  IterationTime=250.0000 ms  
MaxIterationCount=20  MinIterationCount=15  WarmupCount=1  

|                             Method |        Job |                          ...   Toolchain | Count |         Mean |      Error |     StdDev |       Median |          Min |          Max | Ratio | RatioSD | Allocated | Alloc Ratio |
|----------------------------------- |----------- |--------------------------...------------ |------ |-------------:|-----------:|-----------:|-------------:|-------------:|-------------:|------:|--------:|----------:|------------:|
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |    10 |     37.23 ns |   0.135 ns |   0.105 ns |     37.24 ns |     37.04 ns |     37.40 ns |  0.99 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |    10 |     51.72 ns |   0.492 ns |   0.460 ns |     51.48 ns |     51.21 ns |     52.79 ns |  1.38 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |    10 |     40.54 ns |   0.125 ns |   0.104 ns |     40.57 ns |     40.32 ns |     40.67 ns |  1.08 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |    10 |     37.49 ns |   0.386 ns |   0.361 ns |     37.40 ns |     36.94 ns |     38.10 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |    10 |     48.14 ns |   0.303 ns |   0.283 ns |     48.23 ns |     47.62 ns |     48.55 ns |  1.28 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |              |            |            |              |              |              |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |    10 |     38.37 ns |   0.419 ns |   0.371 ns |     38.55 ns |     37.78 ns |     38.80 ns |  1.14 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |    10 |     33.81 ns |   0.309 ns |   0.289 ns |     33.71 ns |     33.49 ns |     34.25 ns |  1.00 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |    10 |     34.32 ns |   0.310 ns |   0.275 ns |     34.38 ns |     33.88 ns |     34.75 ns |  1.02 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |    10 |     33.69 ns |   0.300 ns |   0.281 ns |     33.57 ns |     33.34 ns |     34.17 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |    10 |     34.78 ns |   0.438 ns |   0.410 ns |     34.64 ns |     34.28 ns |     35.46 ns |  1.03 |    0.02 |         - |          NA |
|                                    |            |                          ...             |       |              |            |            |              |              |              |       |         |           |             |
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |   100 |    376.28 ns |   7.145 ns |   7.017 ns |    374.36 ns |    364.26 ns |    388.49 ns |  1.01 |    0.03 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |   100 |    523.52 ns |   6.856 ns |   6.413 ns |    520.05 ns |    517.00 ns |    532.98 ns |  1.40 |    0.02 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |   100 |    406.51 ns |   5.574 ns |   4.941 ns |    407.61 ns |    397.46 ns |    416.27 ns |  1.09 |    0.02 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |   100 |    374.23 ns |   4.037 ns |   3.776 ns |    373.18 ns |    370.19 ns |    380.96 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |   100 |    379.11 ns |   7.410 ns |   6.932 ns |    379.49 ns |    362.72 ns |    393.39 ns |  1.01 |    0.02 |         - |          NA |
|                                    |            |                          ...             |       |              |            |            |              |              |              |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |   100 |    329.32 ns |   1.372 ns |   1.216 ns |    329.63 ns |    326.50 ns |    331.14 ns |  0.98 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |   100 |    330.40 ns |   3.347 ns |   3.131 ns |    328.57 ns |    327.61 ns |    335.65 ns |  0.98 |    0.02 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |   100 |    329.34 ns |   3.031 ns |   2.531 ns |    328.99 ns |    326.53 ns |    336.07 ns |  0.98 |    0.02 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |   100 |    337.35 ns |   5.340 ns |   4.995 ns |    338.07 ns |    325.61 ns |    344.59 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |   100 |    331.11 ns |   2.863 ns |   2.678 ns |    331.52 ns |    326.15 ns |    335.20 ns |  0.98 |    0.02 |         - |          NA |
|                                    |            |                          ...             |       |              |            |            |              |              |              |       |         |           |             |
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |  1000 |  3,999.55 ns |  11.399 ns |   9.519 ns |  3,995.98 ns |  3,990.17 ns |  4,018.78 ns |  0.99 |    0.02 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |  1000 |  5,471.99 ns |  22.221 ns |  19.698 ns |  5,469.47 ns |  5,436.61 ns |  5,503.64 ns |  1.35 |    0.02 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |  1000 |  4,534.04 ns |  51.153 ns |  47.849 ns |  4,493.89 ns |  4,486.41 ns |  4,603.59 ns |  1.12 |    0.02 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |  1000 |  4,049.33 ns |  67.568 ns |  63.204 ns |  4,017.68 ns |  3,977.21 ns |  4,147.87 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |  1000 |  4,106.92 ns |   2.747 ns |   2.435 ns |  4,107.04 ns |  4,103.66 ns |  4,110.83 ns |  1.02 |    0.02 |         - |          NA |
|                                    |            |                          ...             |       |              |            |            |              |              |              |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe |  1000 |  3,625.55 ns |  44.134 ns |  41.283 ns |  3,604.02 ns |  3,576.95 ns |  3,695.00 ns |  1.00 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe |  1000 |  3,718.72 ns |  17.578 ns |  16.442 ns |  3,723.51 ns |  3,682.75 ns |  3,736.57 ns |  1.02 |    0.02 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe |  1000 |  3,669.18 ns |  22.065 ns |  19.560 ns |  3,674.40 ns |  3,625.66 ns |  3,700.41 ns |  1.01 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe |  1000 |  3,639.05 ns |  51.919 ns |  46.024 ns |  3,641.43 ns |  3,573.36 ns |  3,707.27 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe |  1000 |  3,601.02 ns |   5.470 ns |   4.849 ns |  3,599.74 ns |  3,595.86 ns |  3,611.46 ns |  0.99 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |              |            |            |              |              |              |       |         |           |             |
|  TryGetValue_True_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe | 10000 | 58,176.18 ns | 252.555 ns | 223.884 ns | 58,211.13 ns | 57,574.46 ns | 58,532.92 ns |  0.95 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe | 10000 | 74,788.53 ns | 392.748 ns | 367.377 ns | 74,816.78 ns | 73,657.95 ns | 75,172.34 ns |  1.22 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe | 10000 | 65,365.60 ns | 434.547 ns | 406.476 ns | 65,556.51 ns | 64,500.59 ns | 65,729.93 ns |  1.07 |    0.01 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe | 10000 | 61,383.00 ns | 761.779 ns | 675.298 ns | 61,090.13 ns | 60,489.46 ns | 62,616.74 ns |  1.00 |    0.00 |         - |          NA |
|  TryGetValue_True_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe | 10000 | 61,087.63 ns | 437.549 ns | 387.876 ns | 61,005.44 ns | 60,714.91 ns | 62,061.50 ns |  1.00 |    0.01 |         - |          NA |
|                                    |            |                          ...             |       |              |            |            |              |              |              |       |         |           |             |
| TryGetValue_False_FrozenDictionary | Job-FODOIH |  \dotnet-runtime-classes\...\corerun.exe | 10000 | 49,141.91 ns | 438.858 ns | 410.508 ns | 49,246.96 ns | 48,499.52 ns | 49,703.90 ns |  1.06 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-CEDCLT |     \dotnet-runtime-comp\...\corerun.exe | 10000 | 46,465.68 ns | 501.009 ns | 468.644 ns | 46,615.14 ns | 45,828.77 ns | 47,013.70 ns |  1.01 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-SZUZFO | \dotnet-runtime-comparer\...\corerun.exe | 10000 | 48,534.44 ns | 329.553 ns | 308.264 ns | 48,524.19 ns | 48,045.82 ns | 49,055.84 ns |  1.05 |    0.01 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-ZEUSZJ |     \dotnet-runtime-main\...\corerun.exe | 10000 | 46,188.32 ns | 194.598 ns | 172.506 ns | 46,189.71 ns | 45,901.00 ns | 46,476.44 ns |  1.00 |    0.00 |         - |          NA |
| TryGetValue_False_FrozenDictionary | Job-WNQNIB |    \dotnet-runtime-noopt\...\corerun.exe | 10000 | 47,880.95 ns | 179.066 ns | 158.738 ns | 47,901.15 ns | 47,673.91 ns | 48,263.48 ns |  1.04 |    0.01 |         - |          NA |

@eiriktsarpalis
Copy link
Member

@andrewjsaid let's go with the final option - disabling the optimization causing the bug. Would it be possible to open that in a separate PR so that the two diffs can be compared by other reviews as well?

@andrewjsaid
Copy link
Contributor Author

@eiriktsarpalis done. Please see #94667 to compare to this PR.

@eiriktsarpalis
Copy link
Member

Closing in favor of #94667.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Collections community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants