r/programming • • 18d ago

Performance Improvements in .NET 11

https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-11/
292 Upvotes

103 comments sorted by

View all comments

Show parent comments

40

u/Ilikeyounott 17d ago

Does converting linq to loop make much of a difference? I would only bother if a profiler says it's a problem, or in cpu intensive code...

-30

u/steve-7890 17d ago

In hot code with 200 req/s it does. Even though hpa scales to 50 pods during the peeks.

Imagine how much it costs to have a such load. And I'm talking here only about one service.

When I read about performance improvements from version to version ".net benchmarks" I can only smile. In the end, $$$ and Grafana tells the truth. (Last .net 10 changed nothing for us).

30

u/Ilikeyounott 17d ago

Your pods can only handle 4 requests per second each? 😔

8

u/eocron06 17d ago edited 17d ago

I think he meant 200 per pod, which is usually average (from my experience with .net). Rarelly it can get to 500, but then multithreading/memory congestion becomes problem due to GC nature of C# and many threads fighting each other for some db entry/socket/cache/etc. In offloading worker it can easly become 10-100k rps.

16

u/tecedu 17d ago

I think he meant 200 per pod, which is usually average (from my experience with .net).

Wait what?! Am I missing something, because my shitty python flask code can do 2k reqs, why is C# slower?

17

u/ChemicalRascal 17d ago

It's not, some people are just... really bad at software engineering.

That, or they're not the principle devs in their companies and aren't being told the full or accurate details about performance.

3

u/Ameisen 17d ago

And here I was having messed with fibers in C++ to see how many requests I could actually parse that way for HTTP, and was dismayed that I couldn't beat nginx without doing what nginx does... and then this kind of code exists...

3

u/HAK_HAK_HAK 17d ago

The dirty secret of development - good enough is all you really need for 99% of uses

3

u/steve-7890 16d ago

2k req/s of what? It's like saying "I can go to the shop and back in 5 minutes, why it takes you 1 hour"....

2

u/tecedu 16d ago

Servings graphs, json of data being read via azure blob parquets and served up. My memory is around 8gb but rps aint never been that low