.NET 6 vs. .NET 5: up to 40% speedup

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • FrameworkBenchmarks

    Source for the TechEmpower Framework Benchmarks project

  • That seems a bit misleading of a comparison IMO and only one case (JSON serialisation) when I look at their data. It's also showing a lot of frameworks that are not that mature and not well used in the Java camp vs ASP.NET that is widely used, full featured, has a lot of bells and whistles and a lot of plugins available for most technologies and standards. All of which could have negatively influenced performance, even the hooks to allow them to be injected in can do so even if not enabled. The fact that a full featured web framework makes it to the top over several rounds I can't discount as pretty good.

    https://www.techempower.com/benchmarks/#section=data-r20&hw=...

    My personal experience having worked on both platforms for several years is that Java is easier to get to an acceptable performance, but the .NET runtime when you have to put the effort in has a higher bound of performance. It just has more tools in the CLR to work with than the JVM (e.g. value types, proper generics, spans, and more). With .NET Core and future versions I think .NET is also taking up Java's default perf area as well.

  • .NET Runtime

    .NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.

  • > - Use LINQ cautiously as its variants are mostly slower than explicit coding. E.g. .Any() vs .Count == 0

    Is this really true for the example? To me it seems that the implementation for .Any actually uses .Count when available, see https://github.com/dotnet/runtime/blob/main/src/libraries/Sy...

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • are-we-fast-yet

    Are We Fast Yet? Comparing Language Implementations with Objects, Closures, and Arrays

  • > Software benchmarks are super subjective.

    No, they are not, but they are just a measurement tool, not a source of absolute thruth. When I studied engineering at ETH we learned "Who measures measures rubbish!" ("Wer misst misst Mist!" in German). Every measurement has errors and being aware of these errors and coping with it is part of the engineering profession. The problem with programming language benchmarks is often that the goal is to win by all means; to compare as fairly and objectively as possible instead, there must be a set of suitable rules adhered to by all benchmark implementations. Such a set of rules is e.g. given for the Are-we-fast-yet suite (https://github.com/smarr/are-we-fast-yet).

  • BenchmarkDotNet

    Powerful .NET library for benchmarking

  • RoslynClrHeapAllocationAnalyzer

    Discontinued Roslyn based C# heap allocation diagnostic analyzer that can detect explicit and many implicit allocations like boxing, display classes a.k.a closures, implicit delegate creations, etc.

  • LoggerIsEnabled.Fody

    Add-in for Fody, ads ILogger.IsEnabled check to your logging statements

  • Fusion

    Build real-time apps (Blazor included) with less than 1% of extra code responsible for real-time updates. Host 10-1000x faster APIs relying on transparent and nearly 100% consistent caching. We call it DREAM, or Distributed REActive Memoization, and it's here to turn real-time on!

  • The library benchmarked in the article is Stl.Fusion: https://github.com/servicetitan/Stl.Fusion. I've only learned about it today, and the documentation is a bit messy, but that seems to be a really interesting project. The author describes it as a .Net library to quickly develop efficient, distributed, real-time web applications.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • sdk

    Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI (by dotnet)

  • Ownership by Microsoft isn't great either, unless you enjoy jumping through hoops to disable their telemetry[1].

    [1] https://github.com/dotnet/sdk/issues/6145

  • Serilog

    Simple .NET logging with fully-structured events

  • I use it for structured logging, which makes filtering and searching very convenient. E.g. I can filter by an object’s id and a property to see which tasks change the property of that specific object and in what order. Serilog[0] and Seq[1] are the best tools for this in my opinion.

    [0] https://github.com/serilog/serilog

    [1] https://datalust.co/seq

  • GCBurn

    Garbage collection / allocation performance tests for various languages (for now, just C# / .NET and Go)

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts