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

⚡ Optimized HashNode.ToBencodex() #3924

Merged

Conversation

greymistcube
Copy link
Contributor

@greymistcube greymistcube commented Aug 14, 2024

Resolves #3922.

Sample benchmark with 1,000,000 HashDigest<SHA256>s:

Method Mean Error StdDev Gen0 Gen1 Gen2 Allocated
ByteArray 214.1 ms 4.20 ms 7.14 ms 12000.0000 4333.3333 666.6667 116.67 MB
ToByteArray 417.9 ms 9.98 ms 28.97 ms 29000.0000 10000.0000 - 223.48 MB

@greymistcube greymistcube changed the title Optimized HashNode.ToBencodex() ⚡ Optimized HashNode.ToBencodex() Aug 14, 2024
@greymistcube greymistcube force-pushed the chore/remove-to-byte-array branch from 13396e1 to 7407293 Compare August 14, 2024 10:11
@greymistcube greymistcube self-assigned this Aug 14, 2024
@greymistcube greymistcube force-pushed the chore/remove-to-byte-array branch from 7407293 to d148c24 Compare August 14, 2024 10:12
@greymistcube greymistcube marked this pull request as ready for review August 14, 2024 10:12
@greymistcube greymistcube merged commit 7a6eba2 into planetarium:main Aug 20, 2024
22 checks passed
@greymistcube greymistcube deleted the chore/remove-to-byte-array branch September 6, 2024 01:51
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.

Use ByteArray instead of ToByteArray() for HashNode.ToBencodex() implementation
1 participant