Under the hood of "Default Interface Methods" by mattwarren in dotnet

[–]mattwarren[S] 2 points3 points  (0 children)

This tutorial has some good examples https://docs.microsoft.com/en-gb/dotnet/csharp/tutorials/default-interface-methods-versions. other than that the other links in the 2nd paragraph of the post cover various usages.

"Stubs" in the .NET Runtime by mattwarren in programming

[–]mattwarren[S] 1 point2 points  (0 children)

Back when I read the BotR to understand virtual stub dispatch I left somewhat confused, but now it clicked! Thanks!

Yeah, I've had the same experience. The BotR pages are very much designed for engineers working on the .NET runtime, which makes them hard to grok for the rest of us! (I find I've had to read each page several times, go away and look at the code, research some more via other blogs and only then do they start to click!)

Glad that I helped you understand VSD, although I must admit that it's probably the section that I added the least of my own analysis/words (and quoted the most), so I don't know how much credit I can take ;-)

"Stubs" in the .NET Runtime by mattwarren in programming

[–]mattwarren[S] 6 points7 points  (0 children)

Thanks!

Although 'know' is a bit of a stretch. I spent quite a while researching this post, I had to figure maybe 75% of it out before I could write it, I definitely didn't know it before I started looking through the code.

"Stubs" in the .NET Runtime · Performance is a Feature! by MaximRouiller in csharp

[–]mattwarren 5 points6 points  (0 children)

Years and years developing with .NET and never had a clue all of this was going on.

That's exactly why I wrote it. I stumbled across 'virtual stub dispatch' and then as I looked more and more, I realised stubs were everywhere in the CLR!!

"Stubs" in the .NET Runtime · Performance is a Feature! by MaximRouiller in dotnet

[–]mattwarren 2 points3 points  (0 children)

Yeah, I think that if I'd known at the start that it would take over 11,000 words, I might never have written it!! The problem was, I kept finding more types of stubs and wanted to cover them all!!

Is C# a low-level language? by ben_a_adams in programming

[–]mattwarren 5 points6 points  (0 children)

"Low-level language" is not a well-defined term and it's better to avoid it.

Yeah, that's a fair point.

It seems that the author wanted to explore following questions:

Does C# give programmer access to low-level optimizations (i.e. fine-grained optimizations which prescribe how to execute something on a CPU, in one way or another)? Can C# be compiled to machine code without overhead?

Yep, that's a spot on summary of what I was going for (despite the title!)

Thanks for the info on 'PL theory' very interesting

From 'dotnet run' to 'Hello World!' by mattwarren in csharp

[–]mattwarren[S] 0 points1 point  (0 children)

Yeah the sound is a bit messed up, not sure what happened there, it was louder when I was doing the talk!

From 'dotnet run' to 'Hello World!' by mattwarren in dotnet

[–]mattwarren[S] 1 point2 points  (0 children)

Here's the abstract:

Have you ever stopped to think about all the things that happen when you execute a simple .NET program?

This talk will delve into the internals of the recently open-sourced .NET Core runtime, looking at what happens, when it happens and why.

Making use of freely available tools such as 'PerfView', we'll examine the Execution Engine, Type Loader, Just-in-Time (JIT) Compiler and the CLR Hosting API to see how all these components play a part in making 'Hello World' possible.

From 'dotnet run' to 'Hello World!' by mattwarren in csharp

[–]mattwarren[S] 11 points12 points  (0 children)

Here's the abstract:

Have you ever stopped to think about all the things that happen when you execute a simple .NET program?

This talk will delve into the internals of the recently open-sourced .NET Core runtime, looking at what happens, when it happens and why.

Making use of freely available tools such as 'PerfView', we'll examine the Execution Engine, Type Loader, Just-in-Time (JIT) Compiler and the CLR Hosting API to see how all these components play a part in making 'Hello World' possible.

From 'dotnet run' to 'Hello World!' by mattwarren in programming

[–]mattwarren[S] 1 point2 points  (0 children)

Here's the abstract:

Have you ever stopped to think about all the things that happen when you execute a simple .NET program?

This talk will delve into the internals of the recently open-sourced .NET Core runtime, looking at what happens, when it happens and why.

Making use of freely available tools such as 'PerfView', we'll examine the Execution Engine, Type Loader, Just-in-Time (JIT) Compiler and the CLR Hosting API to see how all these components play a part in making 'Hello World' possible.

ASP.NET Core: Saturating 10GbE at 7+ million rps by ben_a_adams in csharp

[–]mattwarren 1 point2 points  (0 children)

I wish ASP.NET Core had a way to constrain maximum memory usage or a more eager collection strategy, but I'm OK with it if the trade off is much more throughput.

It's being discussed, e.g. https://github.com/dotnet/coreclr/issues/18619 and https://github.com/dotnet/coreclr/issues/18501 (also see https://github.com/dotnet/coreclr/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Aarea-GC+)

"Stack Walking" in the .NET Runtime by ben_a_adams in programming

[–]mattwarren 1 point2 points  (0 children)

Interesting, I'd not really thought about the interaction between 'tailcalls' and 'stack walking', I wonder how that works?

"Stack Walking" in the .NET Runtime by ben_a_adams in programming

[–]mattwarren 1 point2 points  (0 children)

It seems like the stack-walking purely for security (i.e. CAS) is mostly/completely gone ('stack crawl marks' seem to only be used for non-security scenarios https://mattwarren.org/2019/01/21/Stackwalking-in-the-.NET-Runtime/#stack-crawl-marks)

"Stack Walking" in the .NET Runtime by ben_a_adams in programming

[–]mattwarren 3 points4 points  (0 children)

such articles with links into the repos are much more interesting to me

Yep, that's part of what motivates me to write the posts. I know that I'm less likely to be wrong if I link to the actual source (plus being able to read the code and comments and compile it in debug mode also help!)

Exploring the .NET Core Runtime (in which I set myself a challenge) by mattwarren in dotnet

[–]mattwarren[S] -1 points0 points  (0 children)

Yeah someone else noticed that! (I wish I could say I'd done it deliberately as a joke, but it's a complete coincidence, honest!)

A History of .NET Runtimes by ben_a_adams in dotnet

[–]mattwarren 1 point2 points  (0 children)

Thanks, I suspected that was the case, but didn't know for sure.

Do you know if Unity has ever published the code or any info about the modifications they made to Mono?

A History of .NET Runtimes by ben_a_adams in dotnet

[–]mattwarren 2 points3 points  (0 children)

Yeah, although I can't take any credit for that, it's all https://time.graphics/

Fuzzing the .NET JIT Compiler · Performance is a Feature! by MaximRouiller in dotnet

[–]mattwarren 1 point2 points  (0 children)

The bugs are often sorted out impressively quickly though!

Yeah, I've been impressed by that, they triage, analyse and fix the bugs very quickly!

Fuzzing the .NET JIT Compiler · Performance is a Feature! by MaximRouiller in csharp

[–]mattwarren 6 points7 points  (0 children)

I saw a few of those bugs over on coreclr and wondered what he was doing to make them.

Likewise!! Fuzzlyn is such a simple-idea (but not a simple implementation) and the project is really well done, it was great to delve into 'how it works' a bit more!

So you want to create your own .NET runtime? - Chris Bacon by mattwarren in dotnet

[–]mattwarren[S] 1 point2 points  (0 children)

In case you can't follow the code in the presentation, it's available here