The C# version uses unsafe raw pointers which is practically the same as writing it in C. No surprise then that the outcomes are similar.
The C# version uses unsafe raw pointers which is practically the same as writing it in C. No surprise then that the outcomes are similar.
Yeah, the point being that you can write a much safer application, and in a very small section reach out to unsafe code, instead of having 100% unsafe code application, or having to do Python style, "Python libraries" that are actually C libraries.
You can also do Memory<T> and Span<T> over unmanaged memory to make things.. Safer.
Sure, but the point still stands versus using 100% raw C.
I only wish that the performance focus was there back in .NET 1.0, with the main architect coming from Delphi, but Microsoft had other priorities.
Also can we please have proper syntax for inline arrays instead of a special purpose attribute? Don't really get that one.