Removing C# stack copies syntactically
A proposal that eliminates stack copies at the heart of C type'ish languages like C# when using 'structs' (aka value types) heavily as is done in image manipulation, graphics in general, physics, games, Unity3D, etc (I'm sure there are many more fields as well).
Key arguments for this feature
- 40% .NET Core & Framework performance increase on i3-7100 using this benchmark with 'USE_OUT' enabled: Link
- Performance increase could actually be higher if the code complexity increased.
- Not yet tested but guessing even a bigger gain on ARM SoC.
- Allows one to describe vector based algorithms in C# as you do in HLSL, GLSL, CG, etc without performance loss due to stack copies.
- You can maintain operator 'precedence' in vector math as is done with primitive types in C#.
- Doesn't break older C# or .NET runtime versions.