Welcome to my .NET Benchmarks repository! This repository is dedicated to benchmarking performance in .NET applications. Whether you're optimizing code, comparing different implementations, or evaluating the impact of changes, this collection of benchmarks will help you make informed decisions about the performance of your .NET projects.
To get started with .NET benchmarks, follow these steps:
- Clone the Repository:
git clone https://github.com/TrevorMcCubbin/DotnetBenchmarks.git
cd DotnetBenchmarks
Install .NET 8 SDK: Make sure you have the .NET Core SDK installed.
To run Json Benchmarks in .Net 8:
dotnet run -c release --project .\src\DotnetBenchmarks.Json\DotnetBenchmarks.Json.csproj
To run a comparison of various benchmarks between .Net 8 and .Net Framework 4.8:
dotnet run -c release --project .\src\DotnetBenchmarks.FrameworkFaceOff\DotnetBenchmarks.FrameworkFaceOff.csproj --framework net8.0
Explore Results: After running the benchmarks, explore the generated reports and analyze the performance metrics.
When contributing benchmarks or analyzing results, please follow these guidelines:
Isolate Benchmarks:
Ensure that each benchmark is isolated and representative of a specific scenario or functionality.
Repeatable Results:
Benchmarks should be repeatable, providing consistent results across multiple runs.
Documentation:
Clearly document the purpose and methodology of each benchmark. Include relevant details about the test environment.
Avoid Premature Optimization:
Focus on meaningful optimizations rather than premature optimizations. Consider the trade-offs between readability and performance.
Report Issues:
If you encounter any issues or unexpected behavior in benchmarks, please report them using the GitHub Issues page.
We welcome contributions! To contribute to this repository:
- Fork the repository and create a new branch for your feature or bug fix.
- Make your changes and ensure all tests and benchmarks pass.
- Submit a pull request with a clear description of your changes.
This project is licensed under the GNU 3 License - see the LICENSE file for details.
Happy benchmarking! 🚀