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

⚡ Use FrozenDictionarys where possible #403

Merged
merged 1 commit into from Sep 14, 2023
Merged

Conversation

eduherminio
Copy link
Member

@eduherminio eduherminio commented Sep 13, 2023

As explained in https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-8/#frozen-collections, Frozen collections are specialized in reading:

Method Mean Ratio
ImmutableDictionaryGets 360.55 us 13.89
DictionaryGets 39.43 us 1.52
FrozenDictionaryGets 25.95 us 1.00

[-5, 0]:

Score of Lynx 1486 - frozen dict vs Lynx 1484 - main: 4529 - 4470 - 3435  [0.502] 12434
...      Lynx 1486 - frozen dict playing White: 2776 - 1721 - 1720  [0.585] 6217
...      Lynx 1486 - frozen dict playing Black: 1753 - 2749 - 1715  [0.420] 6217
...      White vs Black: 5525 - 3474 - 3435  [0.582] 12434
Elo difference: 1.6 +/- 5.2, LOS: 73.3 %, DrawRatio: 27.6 %
SPRT: llr 2.95 (100.3%), lbound -2.94, ubound 2.94 - H1 was accepte

@eduherminio eduherminio marked this pull request as ready for review September 14, 2023 21:24
@eduherminio eduherminio merged commit b99ae6f into main Sep 14, 2023
21 checks passed
@eduherminio eduherminio deleted the perf/frozen-dictionaries branch September 14, 2023 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant