Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
andyayers
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
andyayers
1y ago
Microsoft | Compiler Engineer, .NET JIT | C++, C# | Redmond WA / Other locations possible We are a small tight-knit team, happy to both teach and learn new ways of making code run faster. If you're curious about the kind of work w
2.
▲
by
andyayers
1y ago
.NET JIT developer here. What else would we call it? It is what it is. I believe there are some differences between what .NET does and what mainstream Java does. For instance, objects can be stack allocated even if they can't be turned
3.
▲
by
andyayers
1y ago
Sometimes, yes. Linq contains a goodly number of hand-crafted special-case enumerators for common collections, or collections with certain interfaces, or span projections that are really nice optimizations but can complicate things for the
4.
▲
by
andyayers
1y ago
Here is one that has some historical comparison, though it does not show perf on Framework, and no .NET 10 yet. https://endjin.com/blog/2024/11/how-dotnet-9-boosted-ais-dot...
5.
▲
by
andyayers
1y ago
HPUX compilers were doing this back in 1993.
6.
▲
by
andyayers
1y ago
Unfortunately, those improvements don't work for Linq. Some notes on why this is so here: https://github.com/dotnet/runtime/blob/main/docs/design/core...
7.
▲
by
andyayers
1y ago
There indeed is a regression if the method is only called a few times. But not if it is called frequently. With BenchmarkDotNet it may not be obvious which scenario you intend to measure and which one you end up measuring. BDN runs the benc
8.
▲
by
andyayers
1y ago
Long-running methods (like the one here) transition mid-execution to more optimized versions, via on-stack replacement (OSR), after roughly 50K iterations. So you end up running optimized code either if the method is called a lot or loops f
9.
▲
by
andyayers
2y ago
For the .NET JIT, at least, speculation on types seems beneficial even if we're only right maybe 30% of the time. See eg https://github.com/dotnet/runtime/blob/main/docs/design/core... (wh
10.
▲
by
andyayers
2y ago
Or https://learn.microsoft.com/en-us/defender-endpoint/microsof... (DevDrive + Defender's "performance mode")
11.
▲
by
andyayers
2y ago
In .NET, even in optimized methods, there can be "untracked" lifetimes where a stack slot is reported live to GC throughout the extent of a method, so presumably these can lead to the "over-reporting" cases mentioned. Th
12.
▲
by
andyayers
2y ago
Not these days, but yes, years ago.
13.
▲
by
andyayers
2y ago
There are a few interesting places where Galois Theory touches on compilation/programming. Abstract interpretation models a potentially infinite set of program behaviors onto a simpler (often finite) model that is (soundly) approximate
14.
▲
by
andyayers
2y ago
Something closer to a "pure codegen/runtime" example perhaps: I have data showing Roslyn (the C# compiler, itself written in C#) speeds up between ~2x and ~3x running on .NET 8 vs .NET 4.7.1. Roslyn is built so that it can ru
15.
▲
by
andyayers
4y ago
Feel free to open an issue for this over at github.com/dotnet/runtime, if you have code you can share.
16.
▲
by
andyayers
4y ago
IIRC with .NET 7 we will be able to improve this as we can now dump the jit-generated assembly from official builds. .NET 7 will be officially released in a month or so. Currently C#/F#/VB support in Compiler Explorer relies on pr
17.
▲
by
andyayers
5y ago
Yes, we need to provide more guidance. For now, you might find more info by searching for COMPlus_TieredPGO. The DOTNET_ prefix is a recent addition.
18.
▲
by
andyayers
5y ago
Please let us know how well (or poorly) it works for you.
19.
▲
by
andyayers
6y ago
FWIW [peachpie]( https://www.peachpie.io/2020/09/peachpie-1-0-preview1.html ) is a fairly complete PHP stack running on top of .NET core, leveraging the .NET runtime and jit. It can do things like host WordPress. It
20.
▲
by
andyayers
7y ago
FWIW, MSVC has had this ability for a few years now. It helps with both normal compilation unit compiles and with link-time code generation. See for instance Bruce Dawson's notes: https://randomascii.wordpress.com/2014&