News for hackers. Stuff that matters.
Re:Hardware Intrinsics in .NET 8 by pjc50 on Tuesday December 19, 2023 @08:07AM (#38695028)
They've linked to some examples:

https://source.dot.net/#System.Linq/System/Linq/MaxMin.cs,70

It's a little hard to read (due to the use of "ref" everywhere for raw pointer arithmetic), but that implements the use of vectorized min/max instructions to find the max of elements in an array (or any span), comparing them N at a time rather than 1 at a time.

If you don't call "new", and are careful to call non-allocating functions, and pass everything by reference, then the GC is irrelevant.

Obviously you only bother to do this at the very bottom of your flame graph in the hottest spots.

There are no comments on this comment yet.