(no title)
SeasonalEnnui | 5 months ago
Let's say in the first instance, you write a proof of concept algorithm using basic concepts like List<T>, foreach, stream writing. Accessible to a beginner, safe code, but it'll churn memory (which is GC'd) and run using scalar CPU instructions.
Depending on your requirements you can then progressively enhance the memory churn, or the processing speed:
for(;;), async, LINQ, T[], ArrayPool<T>, Span<T>, NativeMemory.Alloc, Parallel.For, Vector<T>, Vector256<T>, System.Runtime.Intrinsics.
Eventually getting to a point where it's nearly the same as the best C code you could write, with no memory churn (or stop-the-world GC), and SIMD over all CPU cores for blisteringly fast performance, whilst keeping the all/most of the safety.
I think these new language features have the same virtue - I can opt into them later, and intellisense/analysers will optionally make me aware that they exist.
opticfluorine|5 months ago
iamflimflam1|5 months ago
panzi|5 months ago
throw-the-towel|5 months ago
pjmlp|5 months ago
C# is not the only one offering these kind of capabilities, still big kudos to the team, and the .NET performance improvements blog posts are a pleasure to read.
unknown|5 months ago
[deleted]