Anixe's good patterns of writing .NET code (mostly focused on performance).
-
Anixe.IO - library for fast operations
-
Microsoft.IO.RecyclableMemoryStream - pooling for MemoryStream object
-
Microsoft.Extensions.ObjectPool - pooling for objects
-
BenchmarkDotNet - multiplatform benchmark tool
- http://mattwarren.org/2016/02/17/adventures-in-benchmarking-memory-allocations/
- http://mattwarren.org/2018/01/22/Resources-for-Learning-about-.NET-Internals/
- https://www.writinghighperf.net/
project
│
└───GoodPractices.Benchmark
| |
| └───Examples // data files used by benchmarks: json, xml, ion, txt
| └───Lib // utility code
| └───Test // benchmark files
| └───Collections
| └───Files
| └───Http
| └───Misc
| └───Strings
-
Add class with benchmark to proper namespace under GoodPractices.Benchmark/Test - if namespace doesn't exist yet just create new one. Alternatively you could keep file under GoodPractices.Benchmark/Test/Misc (discouraged)
-
Add/Update Summary.md in selected namespace
cd GoodPractices.Benchmark
dotnet run -c Release
Http tests require Wiremock.Console running and listening on 8080 port
cd Wiremock.Console
dotnet run -c Release