Skip to content

Conversation

@TheTrueColonel
Copy link
Contributor

@TheTrueColonel TheTrueColonel commented Oct 25, 2025

Made some changes that improve performance a small amount, but cut allocations by more than half.
Also changed the accessors and added readonly to help enforce .NET design guidelines.

Benchmarks between the current version and the updated version, using BenchmarkDotNet:

| Method        | Mean     | Error     | StdDev    | Gen0   | Gen1   | Allocated |
|-------------- |---------:|----------:|----------:|-------:|-------:|----------:|
| GetRequestOld | 5.334 us | 0.0151 us | 0.0212 us | 0.5493 | 0.0153 |  26.97 KB |
| GetRequestNew | 4.998 us | 0.0252 us | 0.0377 us | 0.2365 |      - |  11.62 KB |

Made some improvements that improves performance a small amount, but cuts allocations by more than half.
Also changed the accessors and added `readonly` to help enforce design guidelines.
@alex-jitbit
Copy link
Member

awesome. reviewing asap

@alex-jitbit alex-jitbit merged commit 713f7e1 into jitbit:master Oct 26, 2025
1 check passed
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.

2 participants