diff --git a/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/BenchmarkDotnet.png b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/BenchmarkDotnet.png new file mode 100644 index 0000000000..ed81071118 Binary files /dev/null and b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/BenchmarkDotnet.png differ diff --git a/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/Disruptor.png b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/Disruptor.png new file mode 100644 index 0000000000..d66333865c Binary files /dev/null and b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/Disruptor.png differ diff --git a/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/MemoryPack.png b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/MemoryPack.png new file mode 100644 index 0000000000..cdb4f81e38 Binary files /dev/null and b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/MemoryPack.png differ diff --git a/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/MessagePack.png b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/MessagePack.png new file mode 100644 index 0000000000..dc7d76dd2f Binary files /dev/null and b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/MessagePack.png differ diff --git a/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/Polly.png b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/Polly.png new file mode 100644 index 0000000000..18a930df0e Binary files /dev/null and b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/Polly.png differ diff --git a/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/Post.md b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/Post.md new file mode 100644 index 0000000000..61e342eb92 --- /dev/null +++ b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/Post.md @@ -0,0 +1,161 @@ +# High-Performance .NET Libraries You Didn’t Know You Needed + +Whether you’re building enterprise apps, microservices, or SaaS platforms, using the right libraries can help you ship faster and scale effortlessly. +Here are some **high-performance .NET libraries** you might not know but definitely should. + + + +## 1. BenchmarkDotNet – Measure before you optimize + +![BenchmarkDotnet](benchmarkdotnet.png) + +BenchmarkDotNet makes it simple to **benchmark .NET code with precision**. + +- Easy setup with `[Benchmark]` attributes +- Generates detailed performance reports +- Works with .NET Core, .NET Framework, and Mono + +Perfect for spotting bottlenecks in APIs, background services, or CPU-bound operations. + +- **NuGet** (40M downloads) πŸ”— https://www.nuget.org/packages/BenchmarkDotNet +- **GitHub** (11k stars) πŸ”— https://github.com/dotnet/BenchmarkDotNet + +------ + +## 2. MessagePack – Fastest JSON serializer + +Need speed beyond System.Text.Json or Newtonsoft.Json ? MessagePack is the fastest serializer for C# (.NET, .NET Core, Unity, Xamarin). MessagePack has a compact binary size and a full set of general purpose expressive data types. Ideal for high-traffic APIs, IoT data processing, and microservices. + +![MessagePack Benchmark](MessagePack.png) + +- **NuGet** (204M downloads) πŸ”— https://www.nuget.org/packages/messagepack +- **GitHub** (6.4K stars) πŸ”— https://github.com/MessagePack-CSharp/MessagePack-CSharp + +------ + +## 3. Polly – Resilience at scale + +![Polly](Polly.png) + +In distributed systems, failures are inevitable. **Polly** provides a fluent way to add **retry, circuit-breaker, and fallback** strategies. + +- Handle transient faults gracefully +- Improve uptime and user experience +- Works seamlessly with HttpClient and gRPC + +A must-have for cloud-native .NET applications. + +- **NuGet** (1B downloads) πŸ”— https://www.nuget.org/packages/polly/ +- **GitHub** (14K stars) πŸ”— https://github.com/App-vNext/Polly + +------ + +## 4. MemoryPack – Zero-cost binary serialization + +If you need **blazing-fast serialization** for in-memory caching or network transport, **MemoryPack** is a game-changer. + +- Zero-copy, zero-alloc serialization +- Perfect for high-performance caching or game servers +- Strongly typed and version-tolerant + +![MemoryPack](MemoryPack.png) + +Great for real-time multiplayer games, chat apps, or financial systems. + +- **NuGet** (5.3M downloads) πŸ”— https://www.nuget.org/packages/MemoryPack +- **GitHub** (4K stars) πŸ”— https://github.com/Cysharp/MemoryPack + +------ + +## 5. WolverineFx – Ultra-low latency messaging + +![wolverine](wolverine-logo.png) + +MediatR was one of the best mediator library but now it's a paid library. Wolverine is a toolset for command execution and message handling within .NET applications. The killer feature of Wolverine is its very efficient command execution pipeline that can be used as: + +- An [inline "mediator" pipeline](https://wolverinefx.net/tutorials/mediator.html) for executing commands +- A [local message bus](https://wolverinefx.net/guide/messaging/transports/local.html) for in-application communication +- A full-fledged [asynchronous messaging framework](https://wolverinefx.net/guide/messaging/introduction.html) for robust communication and interaction between services when used in conjunction with low level messaging infrastructure tools like RabbitMQ +- With the [WolverineFx.Http](https://wolverinefx.net/guide/http/) library, Wolverine's execution pipeline can be used directly as an alternative ASP.Net Core Endpoint provider + +*Below image is from [codecrash.net](https://www.codecrash.net/2024/02/06/Mediatr-versus-Wolverine-performance.html)* +![WolverineFx](wolverine.png) + +WolverineFx is great for cleanly separating business logic from controllers while unifying in-process mediator patterns with powerful distributed messaging in a single, high-performance .NET library. + +- **NuGet** (1.5M downloads) πŸ”— https://www.nuget.org/packages/WolverineFx +- **GitHub** (1.7K stars) πŸ”— https://github.com/JasperFx/wolverine + + + +## 6. Disruptor-net – Next generation free .NET mediator + +The Disruptor is a high performance inter-thread message passing framework. A lock-free ring buffer for ultra-low latency messaging. +features are: + +- Zero memory allocation after initial setup (the events are pre-allocated). + +- Push-based consumers. + +- Optionally lock-free. + +- Configurable wait strategies. + +![Disruptor](Disruptor.png) + +- **NuGet** (1.2M downloads) πŸ”— https://www.nuget.org/packages/Disruptor/ +- **GitHub** (1.3K stars) πŸ”— https://github.com/disruptor-net/Disruptor-net + + + +## 7. CliWrap - Running command-line processes + +![CLIWrap](C:\Users\alper\Desktop\high-perf-dotnet-libs\cliwrap.png) + +CliWrap makes it easy to **run and manage external CLI processes in .NET**. + +- Fluent, task-based API for starting commands +- Streams standard input/output and error in real time +- Supports cancellation, timeouts, and piping between processes + +Ideal for automation, build tools, and integrating external executables. + +- **NuGet** (14.1M downloads) πŸ”— https://www.nuget.org/packages/CliWrap +- **GitHub** (4.7K stars) πŸ”— https://github.com/Tyrrrz/CliWrap + + + +--- + + + +## Hidden Libs from the Community + +### Sylvan.Csv & **Sep** + +- **Sylvan.Csv**: Up to *10Γ— faster* and *100Γ— less memory allocations* than `CsvHelper`, making CSV processing lightning-fast. ([Reddit](https://www.reddit.com/r/csharp/comments/191rwgt/extremely_highperformance_libraries_for_common/?utm_source=chatgpt.com)) +- **Sep**: Even faster than Sylvan, but trades off some flexibility. Great when performance matters more than API richness. ([Reddit](https://www.reddit.com/r/csharp/comments/191rwgt/extremely_highperformance_libraries_for_common/?utm_source=chatgpt.com)) + +### String Parsing: **csFastFloat** + +- Parses `float` and `double` around *8–9Γ— faster* than `.Parse` methodsβ€”perfect for high-volume parsing tasks. ([Reddit](https://www.reddit.com/r/csharp/comments/191rwgt/extremely_highperformance_libraries_for_common/?utm_source=chatgpt.com)) + +### CySharp’s Suite: MemoryPack, MasterMemory, SimdLinq + +- **MemoryPack**: One of the fastest serializers available, with low allocations and high throughput. Ideal for Web APIs or microservices. ([Reddit](https://www.reddit.com/r/csharp/comments/191rwgt/extremely_highperformance_libraries_for_common/?utm_source=chatgpt.com)) +- **MasterMemory**: Designed for databases or config storage. Claims *4,700Γ— faster than SQLite* with zero-allocations per query. ([Reddit](https://www.reddit.com/r/csharp/comments/191rwgt/extremely_highperformance_libraries_for_common/?utm_source=chatgpt.com)) +- **SimdLinq**: SIMD-accelerated LINQ operations supporting a broader set of methods than .NET's built-in SIMD. Works when slight floating-point differences are acceptable. ([Reddit](https://www.reddit.com/r/csharp/comments/191rwgt/extremely_highperformance_libraries_for_common/?utm_source=chatgpt.com)) + +### Jil – JSON Deserializer + +- Ultra-fast JSON (de)serializer with low memory overhead, used in high-scale systems. ([Performance is a Feature!](https://www.mattwarren.org/2014/09/05/stack-overflow-performance-lessons-part-2/?utm_source=chatgpt.com)) + +### StackExchange.NetGain – WebSocket Efficiency + +- High-performance WebSocket server library designed for low-latency IO scenarios. (Now mostly replaced by Kestrel's built-in support, but worth knowing.) ([GitHub](https://github.com/StackExchange/NetGain?utm_source=chatgpt.com)) + +### Math Libraries: Math.NET Numerics & ILNumerics + +- **Math.NET Numerics**: Core numerical methods and matrix math, similar to BLAS/LAPACK. ([Wikipedia](https://en.wikipedia.org/wiki/Math.NET_Numerics?utm_source=chatgpt.com)) +- **ILNumerics**: Efficient numerical arrays with parallelized processing, loop unrolling, cache optimizations. Great for scientific computing. ([Wikipedia](https://en.wikipedia.org/wiki/ILNumerics?utm_source=chatgpt.com)) + diff --git a/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/cliwrap.png b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/cliwrap.png new file mode 100644 index 0000000000..718d1b558b Binary files /dev/null and b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/cliwrap.png differ diff --git a/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/cover.png b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/cover.png new file mode 100644 index 0000000000..a1b4c825e2 Binary files /dev/null and b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/cover.png differ diff --git a/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/wolverine-logo.png b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/wolverine-logo.png new file mode 100644 index 0000000000..b14dc2b7ed Binary files /dev/null and b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/wolverine-logo.png differ diff --git a/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/wolverine.png b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/wolverine.png new file mode 100644 index 0000000000..5ef73f0149 Binary files /dev/null and b/docs/en/Community-Articles/2025-09-11-High-Perf-DotNet-Libs/wolverine.png differ