perf: use FrozenSet/FrozenDictionary for read-only static lookups by thomhurst · Pull Request #6099 · thomhurst/TUnit (original) (raw)

@thomhurst

Convert three read-only static collections queried in hot per-test/per-assembly loops to FrozenSet/FrozenDictionary on net8+ for faster lookups:

Frozen collections are net8+ only, so usage is guarded with #if NET8_0_OR_GREATER; netstandard2.0 retains the existing HashSet/Dictionary. All four TFMs build clean.

Closes #6047

[claude[bot]](/apps/claude)

@thomhurst thomhurst deleted the perf/issue-6047-frozen-collections branch

May 28, 2026 21:02

This was referenced

May 29, 2026

This was referenced

Jun 13, 2026

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})