Analysing .NET start-up time with Flamegraphs
https://mattwarren.org/2020/03/03/Analysing-.NET-Runtime-Startup-with-Flamegraphs/ [mattwarren.org]
2020-03-13 04:25
tags:
dotnet
perf
visualization
Recently I gave a talk at the NYAN Conference called ‘From ‘dotnet run’ to ‘hello world’: In the talk I demonstrate how you can use PerfView to analyse where the .NET Runtime is spending it’s time during start-up:
Is C# a low-level language?
https://mattwarren.org/2019/03/01/Is-CSharp-a-low-level-language/ [mattwarren.org]
2019-03-01 16:30
tags:
csharp
cxx
dotnet
jit
perf
programming
Specifically, what happens when translating a C++ raytracer and trying to make it fast.
I started by simply porting the un-obfuscated C++ code line-by-line to C#. Turns out that this was pretty straight forward, I guess the story about C# being C++++ is true after all!!
source: L
How generics were added to .NET
http://mattwarren.org/2018/03/02/How-generics-were-added-to-.NET/ [mattwarren.org]
2018-03-22 16:48
tags:
compsci
csharp
dotnet
jit
programming
type-system
Before we dive into the technical details, let’s start with a quick history lesson, courtesy of Don Syme who worked on adding generics to .NET and then went on to design and implement F#, which is a pretty impressive set of achievements!
There are some significant differences between the Rotor source code and the real .NET framework. Most notably the JIT and GC are completely different implementations (due to licensing issues, listen to DotNetRocks show 360 - Ted Neward and Joel Pobar on Rotor 2.0 for more info). However, the Rotor source does give us an accurate idea about how other core parts of the CLR are implemented, such as the Type-System, Debugger, AppDomains and the VM itself. It’s interesting to compare the Rotor source with the current CoreCLR source and see how much of the source code layout and class names have remained the same.
Resources for Learning about .NET Internals
http://mattwarren.org/2018/01/22/Resources-for-Learning-about-.NET-Internals/ [mattwarren.org]
2018-01-23 14:07
tags:
compiler
csharp
dotnet
jit
links
perf
programming
type-system
I wouldn’t recommend reading through the entire list, at least not in one go, your brain will probably melt. Picks some posts/topics that interest you and start with those.
A look at the internals of 'Tiered JIT Compilation' in .NET Core
http://mattwarren.org/2017/12/15/How-does-.NET-JIT-a-method-and-Tiered-Compilation/ [mattwarren.org]
2017-12-19 18:19
tags:
dotnet
jit
This is a big change for the CLR, up till now .NET methods have only been JIT compiled once, on their first usage. Tiered compilation is looking to change that, allowing methods to be re-compiled into a more optimised version much like the Java Hotspot compiler.
Adding a new Bytecode Instruction to the CLR
http://mattwarren.org/2017/05/19/Adding-a-new-Bytecode-Instruction-to-the-CLR/ [mattwarren.org]
2017-05-20 02:45
tags:
compiler
dotnet
jit
programming
Now that the CoreCLR is open-source we can do fun things, for instance find out if it’s possible to add new IL (Intermediate Language) instruction to the runtime.
source: HN
Arrays and the CLR - a Very Special Relationship
http://mattwarren.org/2017/05/08/Arrays-and-the-CLR-a-Very-Special-Relationship/ [mattwarren.org]
2017-05-09 03:07
tags:
csharp
dotnet
jit
programming
type-system
It turns out that large parts of the internal implementation of arrays is best described as magic
source: L
The .NET IL Interpreter
http://mattwarren.org/2017/03/30/The-.NET-IL-Interpreter/ [mattwarren.org]
2017-04-01 15:37
tags:
compiler
dotnet
jit
However, I think another really useful scenario for the Interpreter is to help you learn about the inner workings of the CLR. It’s only 8,000 lines long, but it’s all in one file and most significantly it’s written in C++.
source: HN
The 68 things the CLR does before executing a single line of your code
http://mattwarren.org/2017/02/07/The-68-things-the-CLR-does-before-executing-a-single-line-of-your-code/ [mattwarren.org]
2017-02-07 16:31
tags:
dotnet
jit
Initialize components, components, and components.
source: L
Why is reflection slow?
http://mattwarren.org/2016/12/14/Why-is-Reflection-slow/ [mattwarren.org]
2016-12-18 16:28
tags:
compiler
csharp
dotnet
jit
perf
programming
It’s common knowledge that reflection in .NET is slow, but why is that the case? This post aims to figure that out by looking at what reflection does under-the-hood.
Slow, of course, is somewhat relative.