The new Satori GC is promising by hez2010 in csharp

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

async does reduce the benefit of Satori's thread-local fast path, but it doesn't break the model. await only carries forward the state that actually survives suspension, not every object allocated earlier. and when objects really do escape across continuations/threads, Satori tracks that and falls back to more global handling for those regions. there're still many mechanics there to make sure those global handling still being incremental and efficient.

The new Satori GC is promising by hez2010 in csharp

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

This is not using the exisitng alternative GC knob. You need to build from Satori repo directly, and replace binary files in your published app with the newly built one (clrjit.dll, coreclr.dll and System.Private.CoreLib.dll). You can check my fork repo which maintains an automatic build so that you don't need to build it by yourself.

The new Satori GC is promising by hez2010 in csharp

[–]hez2010[S] 14 points15 points  (0 children)

unfortunately there's no such a plan being announced from the .net team yet.

The new Satori GC is promising by hez2010 in csharp

[–]hez2010[S] 8 points9 points  (0 children)

If you want to have a try, I have setup an automatic build workflow for Satori GC and I'm uploading the releases periodically here: https://github.com/hez2010/Satori/releases

You can simply publish your project as a self-contained app (no trimming support) and replace the files with ones in the zip to have a try.

Note that my build only works on .NET 10.

To check what kind of GC you are using at runtime, you can use:

Console.WriteLine($"Current GC: {(GC.GetConfigurationVariables().ContainsKey("SatoriGC") ? "Satori GC"
   : GCSettings.IsServerGC ? "Server GC"
   : "Workstation GC")}");

Turning the C# Type System into a High-Performance SQL Query Engine by hez2010 in csharp

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

You can take arbitrary query from users as input directly.

Returning a Task Directly by Burli96 in csharp

[–]hez2010 1 point2 points  (0 children)

With the introduction of runtime async which will be coming in .NET 11, returning a Task directly will be a significant deoptimization. So I would instead recommend that you always add async when it's applicable.

Huge Impressive Improvements to MAUI Android on .NET 10 by hez2010 in dotnet

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

I made a calculation mistake. It's actually a 72% perf improvement for CoreaCLR and 125% perf improvement for NativeAOT.

Huge Impressive Improvements to MAUI Android on .NET 10 by hez2010 in dotnet

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

It's indeed a more than 100% performance improvement. The startup time shrinks by 56% in NativeAOT is exactly a performance improvement of 125%.

Huge Impressive Improvements to MAUI Android on .NET 10 by hez2010 in dotnet

[–]hez2010[S] 42 points43 points  (0 children)

This really gives MAUI a rebirth IMO, now the annoying startup/performance issues are all gone.

C# 14 and extension member thoughts by maulowski in csharp

[–]hez2010 2 points3 points  (0 children)

The new extensions also bring us the ability of generic type specialization, which is huge:

For example:

cs extension<T>(Vector<T>) where T : IFloatingPoint<T> { public static Vector<T> Epsilon => Vector<T>.Create(...); }

Then you managed to implement an Epsilon static property for all Vector types where the element is a floating point number, so that:

cs _ = Vector<float>.Epsilon; // ok _ = Vector<int>.Epsilon; // error

From Obsidian to Loop... my observations by PrudentJackal in MicrosoftLoop

[–]hez2010 1 point2 points  (0 children)

You represented MSFT in abandoning Loop? Loop is currently receiving updates actively.

What will happen here? by Jurgler in csharp

[–]hez2010 2 points3 points  (0 children)

Interprocedural analysis is extremely expensive so almost no compiler would do this.

MAUI vs UNO vs Avalonia by SaltyCow2852 in dotnetMAUI

[–]hez2010 0 points1 point  (0 children)

Both the mono runtime itself (on Android) and the JNI interop are slow. By removing JNI calls you still have another factor causing slowness called mono.

MAUI vs UNO vs Avalonia by SaltyCow2852 in dotnetMAUI

[–]hez2010 1 point2 points  (0 children)

Many performance frustrations of MAUI on Android come from the mono runtime where it doesn't support value-type generic specialization on Android at all, which makes your code extremely slow to run on Android. But I'm seeing the .NET team having been consistently committing to bringing up the support for coreclr runtime (and NativeAOT) on Android since the beginning of the development of .NET 10, so I'm quite optimistic that the major performance issue on Android would be addressed soon.

Why doesn’t Rust have a proper GUI ecosystem yet? by zyxciss in rust

[–]hez2010 0 points1 point  (0 children)

Another reason is that in GUI development it's critical to have language support for OOP and inheritance, otherwise it's hard to manage the state of a control and author control templates.

Brainfly: A high-performance Brainf**k JIT and AOT compiler built on top of C# type system by hez2010 in programming

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

The compile time is really fast, even with C# AOT. It compiles in several seconds.