Benchmarks
When getting a result that is already in cache, the result is provided at 300ns and with zero heap allocation.
When constructing a new result, there is total overhead of 400ns for one handler, and very low heap allocation.
When using async call model for getting a cached result is 450ns.
When using async call model for creating a new result with one handlers is 1100ns
Method | Mean | Error | StdDev | Gen 0 | Allocated |
---|---|---|---|---|---|
GetWithCache | 306.8 ns | 2.71 ns | 2.40 ns | - | - |
GetAsyncWithCache | 511.3 ns | 7.52 ns | 7.03 ns | 0.0286 | 240 B |
GetWithoutCache | 447.3 ns | 3.82 ns | 3.57 ns | 0.0229 | 192 B |
GetAsyncWithoutCache | 1,123.8 ns | 21.71 ns | 23.23 ns | 0.1087 | 910 B |