322 points soheilpro 2 days ago 87 comments
pjmlp 1 day ago | parent
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 1 day ago | parent
adzm 1 day ago | parent
gerdesj 15 hours ago | parent
I can wind it up to 15! \||/ (is there an official ASCII art four finger devil's horns)
richiebful1 11 hours ago | parent
qingcharles 5 hours ago | parent
kristianp 15 hours ago | parent
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 15 hours ago | parent
kristianp 13 hours ago | parent
nitinreddy88 11 hours ago | parent
gerdesj 15 hours ago | parent
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 14 hours ago | parent
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.
tester756 14 hours ago | parent
mexicocitinluez 1 hour ago | parent
AlexErrant 14 hours ago | parent
; 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?flowerlad 14 hours ago | parent
louthy 14 hours ago | parent
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
keithnz 13 hours ago | parent
jlarocco 12 hours ago | parent
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.
I should add that I read the book "Assembly Language: step-by-step" by Jeff Duntemann, and wrote a Tic-Tac-Toe game in assembly ages ago, so that helps a bit to understand the syntax.
(And technically that's a patch file :-)
bjoli 5 hours ago | parent
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 11 hours ago | parent
apple1417 9 hours ago | parent
drdexebtjl 9 hours ago | parent
You should learn assembly anyway, but it won't make this part any more insightful.
mlhpdx 14 hours ago | parent
CurtHagenlocher 14 hours ago | parent
qingcharles 5 hours ago | parent
kg 1 hour ago | parent
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.
dude250711 14 hours ago | parent
CharlieDigital 14 hours ago | parent
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.
extension(SomeType instance)
{
public OtherType DoSomething() { ... }
}
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 13 hours ago | parent
oldmanhorton 6 hours ago | parent
mexicocitinluez 1 hour ago | parent
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:
List<string> items = [];
into this: List<string> items = new List<string>();bob1029 13 hours ago | parent
Assuming you are competent with scene work and the various art pipelines, the rest of the problem is significantly easier now.
I've been using the Unity CLI to run arbitrary C# code against Unity 6 scenes without requiring domain reloads. It uses Roslyn to compile the snippet in a special Unity editor component instead of running the normal compilation pipeline.
The implications for a reasoning model are significant. Domain reloads in my projects can take 10-20 seconds. Compound across 5-10 tool calls and the difference adds up very quickly.
Sorrel47 13 hours ago | parent
pseudosavant 13 hours ago | parent
d_finch 13 hours ago | parent
rsalus 12 hours ago | parent
refactor_master 11 hours ago | parent
GiorgioG 10 hours ago | parent
tomhow 8 hours ago | parent
littlecranky67 7 hours ago | parent
atraac 7 hours ago | parent
IneffablePigeon 6 hours ago | parent
masfoobar 4 hours ago | parent
Just curious.. what language(s) are you using now?
smt88 2 hours ago | parent
farlight 6 hours ago | parent
"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 6 hours ago | parent
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 3 hours ago | parent
intrasight 2 hours ago | parent
moron4hire 2 hours ago | parent
The navigation system in EF is where all of the pain points originate. All of my troubles with getting the migration generator to work are because I'm trying to express rather complex relationships. For example, to store a record representing a property on an object, I need to have two foreign keys from the Properties table to the Types table: one for the type of the property and one for the type in which the property lives. Types themselves have many relationships to other types: their base type, interface types they implement, generic type parameters, constraints on generic type parameters (actually, haven't even implemented that one as is too much).
I'm generally happy with the performance and expressivity of the system I've developed so far, but damn, it came with a lot of pain.
osigurdson 39 minutes ago | parent
qingcharles 5 hours ago | parent
These days I just use EF with Sqlite on 99% of my projects.
osigurdson 41 minutes ago | parent
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.
ctenb 6 hours ago | parent
osigurdson 51 minutes ago | parent
osigurdson 35 minutes ago | parent
tiffanyh 11 hours ago | parent
I’m afraid posts like this might become fleeting.
Pannoniae 5 hours ago | parent
the technical parts are fresh as ever but the writing style is awful, man
Scharkenberg 4 hours ago | parent
7bit 2 hours ago | parent
lukehoban 10 hours ago | parent
https://github.blog/ai-and-ml/generative-ai/migrating-the-gi...
bjoli 7 hours ago | parent
SideburnsOfDoom 4 hours ago | parent
Here is the "Runtime async" section: 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.
momocowcow 5 hours ago | parent
// Approximately what the JIT generates
if (animal?.GetType() == typeof(Dog))
{
((Dog)animal).Speak(); // devirtualized, inlinable
}
else
{
animal.Speak(); // original virtual call, hopefully rare
}program_whiz 2 hours ago | parent
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.
Disadvantage 2: Writing performant code can no longer be gate kept behind archaic practices, now everyone can just use `var animal = new Dog()` and be done with it.
kg 1 hour ago | parent
anthk 3 hours ago | parent
PrinceJeamvilla 2 hours ago | parent
majora2007 2 hours ago | parent
ochronus 1 hour ago | parent
someguynamedq 1 hour ago | parent
jcon321 1 hour ago | parent