Performance Improvements in .NET 11

devblogs.microsoft.com

279 points by soheilpro 2 days ago


tiffanyh - 6 hours ago

This post was so refreshing to read, because it reminds me of a time of solid engineering & writing in a pre-AI era.

I’m afraid posts like this might become fleeting.

lukehoban - 6 hours ago

For anyone who enjoys Stephen Toub’s deep technical articles like this one as much as I do - he also published another post today on migrating the Copilot coding harness from Node.js to Rust. Another great read.

https://github.blog/ai-and-ml/generative-ai/migrating-the-gi...

adzm - 2 days ago

Runtime async is certainly an interesting development. Really excited to see how this plays out.

momocowcow - an hour ago

casey muratori would like to have a talk with you about the following :))

    // Approximately what the JIT generates
    if (animal?.GetType() == typeof(Dog))
    {
        ((Dog)animal).Speak();  // devirtualized, inlinable
    }
    else
    {
        animal.Speak(); // original virtual call, hopefully rare
    }
rsalus - 8 hours ago

these blog posts have really turned me into a dotnet evangelist. love the framework & language.

d_finch - 8 hours ago

Saw a noticeable startup time boost on a recent project migration. Always appreciate the continued focus on speed.

AlexErrant - 10 hours ago

Dumb Q: should a non-systems-language dev know/read assembly?

    ; Arm64
    --- .NET 10
    +++ .NET 11
    @@ -13,8 +13,6 @@
                ble     G_M000_IG04

    G_M000_IG03:
    -            cmp     w1, w2
    -            bhs     G_M000_IG05
                str     wzr, [x0, w1, UXTW #2]

    G_M000_IG04:
    @@ -25,4 +23,4 @@
                bl      CORINFO_HELP_RNGCHKFAIL
                brk     #0

    -; Total bytes of code 68
    +; Total bytes of code 60
I know C#/F# decently well, but is there any reason to actually pull out the ol textbooks and learn wtf the above is saying?
Sorrel47 - 9 hours ago

Always appreciate the continued perf gains. Our existing services just get faster for free, which is a nice win.

bjoli - 2 hours ago

I hope there will be some kind of runtime async support for the current or a new asyncmethodbuilder. That is amazing work.

pseudosavant - 9 hours ago

Very thorough write up. Clearly a lot of performance improvements across their stack. As if it wasn't detailed/long enough already, I would have loved to see some application-level benchmarks that gave a hint of the cumulative performance gains we should expect.

gerdesj - 10 hours ago

Spinal Tap's "put it up to 11". My laptop (Kubuntu) has volume controls that allow me to override 100% and take it to 150%.

I can wind it up to 15! \||/ (is there an official ASCII art four finger devil's horns)

pjmlp - 2 days ago

Ah the traditional browser stress test from the .NET team. :)

Joke aside, yet another interesting read of all little improvements that go across all the runtime, and very much appreciated that they put out the effort to go through this detail level.

mlhpdx - 9 hours ago

Impressive technical work and authorship. My quibble, which seems significant in context, is what happened with AoT?

equasar - 2 days ago

Thanks Stephen for this, it is very rewarding to read something very technical that is not AI slop these days.

dude250711 - 9 hours ago

C#/.NET are very well-represented in LLM data - from enterprise back-end code to games. A language to use for sure.

- 10 hours ago
[deleted]
kristianp - 10 hours ago

> The sections that follow are full of real improvements. A bounds check removed, an allocation that no longer happens,

Annoyingly the.net blog seems to have started to use LLMs to write their copy. Using "real" twice in one paragraph - do LLMs do that? Lots of commas is a tell for me.

> This is a long one. It’s meant to be. Grab your hot beverage of choice, settle in, and let’s turn it up.

Ugh.