Better HN
topnewbestaskshowjobs
Log inSign up

neonsunset

2,773 karma · joined Nov 9, 2019 (7y ago) · 2,697 submissions

Someone who stares into HN void

C#/.NET, a bit of Rust, F# and asm, performance analysis and (predominantly low-level) optimization.

Feel free to contact me if you have any questions or are curious about these or adjacent topics.

https://github.com/neon-sunset

https://x.com/_neonsunset

neon-sunset_at_outlook_com

Submissions

comment 8mo ago · link · parent

.NET also now has an (amazing) alternate low-pause/effectively pauseless GC: https://github.com/VSadov/Satori

Builds: https://github.com/hez2010/Satori/releases

how to use? do self-contained publish (but not single file), replace 3 files in the folder with the one from Satori release you can check if it's in use with GC.GetConfigurationVariables().ContainsKey("SatoriGC")

It is a far, far superior experience to touching anything C++.

comment 9mo ago · link · parent

Default value is only relevant for structs. You can setup an analyzer rule to ban this for structs which have, say, an empty constructor. It’s a similar problem to Go and C++ except it’s worse in the latter two.

comment 10mo ago · link · parent

Even back in .NET Core 3.1 days C# had more than competitive performance profile with Go, and _much_ better multi-core scaling at allocation-heavy workloads.

It is disingenuous to say that whatever it ships with is huge also.

The common misconception by the industry that AOT is optimal and desired in server workloads is unfortunate. The deployment model (single slim binary vs many files vs host-dependent) is completely unrelated to whether the application utilizes JIT or AOT. Even with carefully gathered profile, Go produces much worse compiler output for something as trivial as hashmap lookup in comparison to .NET (or JVM for that matter).

comment 10mo ago · link · parent

.NET's string.Split implementation is very close to what the article showcases, even 3-character limit is there: https://github.com/dotnet/runtime/blob/main/src/libraries/Sy...
12345
90