Performance Improvements in .NET 11
Thread
Loading the complete thread in the background. This saved snapshot is available now. Refresh
Unofficial Hacker News client; not affiliated with Y Combinator.
Performance Improvements in .NET 11
Loading the complete thread in the background. This saved snapshot is available now. Refresh
Unofficial Hacker News client; not affiliated with Y Combinator.
pjmlp · · focus · HN ↗
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.
equasar · · focus · HN ↗
adzm · · focus · HN ↗
eterm · · focus · HN ↗
gerdesj · · focus · HN ↗
I can wind it up to 15! \||/ (is there an official ASCII art four finger devil's horns)
parineum · · focus · HN ↗
gerdesj · · focus · HN ↗
nob end!
richiebful1 · · focus · HN ↗
qingcharles · · focus · HN ↗
kristianp · · focus · HN ↗
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.
pestkranker · · focus · HN ↗
[deleted] · · focus · HN ↗
[deleted]
kristianp · · focus · HN ↗
nitinreddy88 · · focus · HN ↗
gerdesj · · focus · HN ↗
I suspect it was done old school: Written by Stephen and passed to a LLM to fill in all those links and other garnish and then passed back for final polish by Stephen. That's how I do my write ups (but generally without the LLM bit for shorter efforts).
This is a long write up, and I'm sure it will have been assisted, but in the right way, and not a sloppy way.
I've dropped several commas before conjunctions, soz!
AlexErrant · · focus · HN ↗
I, too, tire of the constant YOU WROTE THIS WITH LLMs outrage. An incredible engineer dumped an ENORMOUS amount of technical knowledge at your feet, and you're commenting on the smell? Is that all you have to contribute?
I saw this too on the Ryan Carniato/SolidJS 2.0 announcement post. A world-class engineer makes a great blog post, and all the comments can focus on are the LLM-smells. Oh well. Any reason not to learn, I guess.
cindyllm · · focus · HN ↗
[dead]
wolttam · · focus · HN ↗
y1n0 · · focus · HN ↗
tester756 · · focus · HN ↗
sltr · · focus · HN ↗
Scharkenberg · · focus · HN ↗
sltr · · focus · HN ↗
mexicocitinluez · · focus · HN ↗
AlexErrant · · focus · HN ↗
flowerlad · · focus · HN ↗
louthy · · focus · HN ↗
The three* letter mnemonics are usually pretty easy to decode, even if you don’t know the architecture: anything beginning with ‘B’ will be branch, so ‘ble’ is branch if less than or equal. L and S based mnemonics are unusually Load and Store from and to memory. After that it’s understanding the stack and registers and you’re pretty much good to go.
Everything in assembly is loading something from memory into registers doing something basic with those registers, like add/divide/etc and then putting the result back into memory or using the result to make a decision to jump to processing instructions from another place in memory.
Most devs won’t ever need to know this stuff, but as someone who grew up with computers that could barely do anything without grinding to a halt (8bit computer, 2mhz processor, 32kb of RAM, 20kb of which is for the screen), knowing this stuff was essential; however I still find this stuff useful today, even with my C# work.
I am a bit of a performance tuning nerd though, so…
[*] or more
masfuerte · · focus · HN ↗
Usually. BRK is a breakpoint.
louthy · · focus · HN ↗
(Also, other architectures might use J for 'Jump' rather than 'Branch'). I don't make the rules ;)
keithnz · · focus · HN ↗
jlarocco · · focus · HN ↗
BUT what I can do is see which functions are being inlined, which values are in memory versus in registers, see if things are being boxed and unboxed a lot, see if SIMD is being used, etc.
And more importantly I can compare two versions of a function to see which one looks better by those criteria. It's not perfect, but IME it works really well for guiding optimization.
bjoli · · focus · HN ↗
That is very handy, especially when writing macros. I only have to look at assembly when I want to know about optimizations that are not visible in the source->source optimizer.
If I ever want to know if something is reified (which I never do) I can always look at the ASM.
Starlevel004 · · focus · HN ↗
applfanboysbgon · · focus · HN ↗
apple1417 · · focus · HN ↗
drdexebtjl · · focus · HN ↗
You should learn assembly anyway, but it won't make this part any more insightful.
mlhpdx · · focus · HN ↗
CurtHagenlocher · · focus · HN ↗
mlhpdx · · focus · HN ↗
rsalus · · focus · HN ↗
qingcharles · · focus · HN ↗
kg · · focus · HN ↗
Unless it's a runtime-only optimization, like guarded devirtualization... there's no straightforward way for an AOT compiler to do that without profiling data.
drewnoakes · · focus · HN ↗
dude250711 · · focus · HN ↗
CharlieDigital · · focus · HN ↗
Case in point: extension members from C# 14 is one that LLMs commonly stumble on and requires an explicit example. It still sometimes says that this is not valid syntax.
Agents really struggle on this one for some reason.Even older releases have a few that I notice LLMs making mistakes on like use of `System.Threading.Lock` over `Object` when locking.
merb · · focus · HN ↗
oldmanhorton · · focus · HN ↗
qingcharles · · focus · HN ↗
[dead]
mexicocitinluez · · focus · HN ↗
Because at this point I would do anything if I could get Github Copilot to understand the new language features and stop trying to constantly revert code.
The one specific thing I'm constantly having to deny is Copilot seeing this:
into this:pjmlp · · focus · HN ↗
sander1095 · · focus · HN ↗
bob1029 · · focus · HN ↗
intrasight · · focus · HN ↗
I'd be interested in hearing more.
bob1029 · · focus · HN ↗
Sorrel47 · · focus · HN ↗
pseudosavant · · focus · HN ↗
d_finch · · focus · HN ↗
rsalus · · focus · HN ↗
refactor_master · · focus · HN ↗
GiorgioG · · focus · HN ↗
tomhow · · focus · HN ↗
GiorgioG · · focus · HN ↗
[dead]
littlecranky67 · · focus · HN ↗
atraac · · focus · HN ↗
IneffablePigeon · · focus · HN ↗
DANmode · · focus · HN ↗
The community is being diluted by…a different demographic!
intrasight · · focus · HN ↗
mpawelski · · focus · HN ↗
masfoobar · · focus · HN ↗
Just curious.. what language(s) are you using now?
atraac · · focus · HN ↗
smt88 · · focus · HN ↗
farlight · · focus · HN ↗
"Everything" expects you to use MSSQL, even if today there's ok official support for PostgreSQL and SQLite. Most "thought leaders" of various sorts are on Windows and expect you to use it. This pervades throughout the ecosystem.
Can't see this ever changing as it's not in MS' interest to turn other operating systems into good .NET development platforms.
aksss · · focus · HN ↗
SQL Server is the flagship database project on the Microsoft side and that team surely has some imperative to facilitate the EF vision. It simply must be less of a priority for the PostgreSQL and SQLite maintainers to do so. Is that really a valid dig on the .net ecosystem, though?
moron4hire · · focus · HN ↗
intrasight · · focus · HN ↗
moron4hire · · focus · HN ↗
littlecranky67 · · focus · HN ↗
osigurdson · · focus · HN ↗
qingcharles · · focus · HN ↗
These days I just use EF with Sqlite on 99% of my projects.
osigurdson · · focus · HN ↗
I'd say Microsoft's revenue related push with .NET these days is to try to subtly nudge you into Azure (where MSSQL is rare and Windows is virtually non-existent). But, I also think they know they will kill .NET if they go overboard with it as the competition is strong.
replwoacause · · focus · HN ↗
ctenb · · focus · HN ↗
osigurdson · · focus · HN ↗
osigurdson · · focus · HN ↗
paulirwin · · focus · HN ↗
The only time I've been forced into a "culture of Windows and creaky Lenovos and Dells" recently was on a Java project. (Anecdotally, of course. Java has a similarly cross-platform culture as a whole.)
replwoacause · · focus · HN ↗
Fervicus · · focus · HN ↗
animal531 · · focus · HN ↗
Just today I created e.g. 100 changes in a file, performed an undo and it rolled back 90 or so of the changes while somehow managing to keep the 5 at the start and the 5 at the end.
tiffanyh · · focus · HN ↗
I’m afraid posts like this might become fleeting.
Pannoniae · · focus · HN ↗
the technical parts are fresh as ever but the writing style is awful, man
Scharkenberg · · focus · HN ↗
mpawelski · · focus · HN ↗
Pannoniae · · focus · HN ↗
sltr · · focus · HN ↗
Timwi · · focus · HN ↗
I don't know if it's even possible anymore to write a detailed, technical article without a swarm of people showing this reaction.
sltr · · focus · HN ↗
7bit · · focus · HN ↗
nozzlegear · · focus · HN ↗
468854259853 · · focus · HN ↗
nozzlegear · · focus · HN ↗
satnhak · · focus · HN ↗
rkagerer · · focus · HN ↗
[dead]
lukehoban · · focus · HN ↗
<a href="https://github.blog/ai-and-ml/generative-ai/migrating-the-github-copilot-runtime-to-rust-using-copilot/" rel="nofollow">https://github.blog/ai-and-ml/generative-ai/migrating-the-gi...
bjoli · · focus · HN ↗
SideburnsOfDoom · · focus · HN ↗
Here is the "Runtime async" section: <a href="https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-11/#runtime-async" rel="nofollow">https://devblogs.microsoft.com/dotnet/performance-improvemen...
I'm not sure if this will surface as an "enabled by default" feature in .NET 11 - indeed there may not be a final decision on that yet. But it is an active area of work that will arrive sooner or later.
afdbcreid · · focus · HN ↗
momocowcow · · focus · HN ↗
program_whiz · · focus · HN ↗
``` void speak_generic(void* animal, int type_id) { if (type_id == DOG) { dog_speak((Dog*)animal); } else { dispatch_speak_vtable(animal); } } ```
Advantage 1: You don't have to maintain this logic (its automatic), so you won't get weird cases if you forget to update all your switches everywhere, and/or you get weird fallthrough logic and footgun yourself in C.
Advantage 2: You still get the flexibility of the vtable if you need it (for the case the type is chosen at runtime at not known). But for 90% of cases, its just as fast as the ugly C code.
Disadvantage 1: Losing a smug sense of superiority because you eschew abstractions and prefer writing verbose error-prone switch statements over clean easy to understand code.
kg · · focus · HN ↗
anthk · · focus · HN ↗
PrinceJeamvilla · · focus · HN ↗
majora2007 · · focus · HN ↗
ochronus · · focus · HN ↗
someguynamedq · · focus · HN ↗
Woodi · · focus · HN ↗
My reading was like this:
- "how much things they postpone to put into v11 ?"
- "moving to stack is faster then heap"
- so.. why they just not use multiple stacks ?? ring buffers are just progressive stack but plain stack is just pointer moving... Hmm, but what is usecase except recursive function calling ?
- ok, I read that articele
- what ? it's just a first part ??
- async thingies
- "state machines looks like that"
- aha, always wanted to konw that, thank you Microsoft! Wait, what?? What I just said ?? That really happened?
- scroll, then scroll more some asm code, maybe I read it later
- something interesting, don't remeber now
- next morning coffee time: O, I have some more to read, maybe I can learn something more ?
- ok, work time but probably will finish reading later today
So it is realy nice article. I learned how to do old-school async wrappers in plain C :)
jcon321 · · focus · HN ↗
testerius · · focus · HN ↗
ozim · · focus · HN ↗
Still I take debugger in Visual studio or Rider any day instead of VSCode debugger.
wiseowise · · focus · HN ↗
Was it? There was only Samsung debugger.
mpawelski · · focus · HN ↗
mpawelski · · focus · HN ↗
<a href="https://isdotnetopen.com/" rel="nofollow">https://isdotnetopen.com/ has a good list of "dramas" questioning if .NET is truly open. At least there are not many new dramas from Microsoft...
For me it's not that big of a deal that some parts are not open. At least we have good competition (Microsoft (Visual Studio, VsCode c# Dev Kit) vs Jetbrais (Rider, VsCode + recent "Resharper for VsCode" extension.) that prevents one party to mess up something big.
drewnoakes · · focus · HN ↗
danlindley · · focus · HN ↗