Is there any performance gain when using features from C# 6.0?
Do C# 6.0 features (like expression-bodied method-like members, using static
, null-conditional operator or string interpolation) have any impact on the performance of a program or at least the compiling time? I like the new features but I was asking myself when using them if there is any performance gain/issue.
Not really. The new features are merely syntactic sugar for things already possible in C#.
The code generated by the new features, like the null-propagation operator, eventually yield the same C# code as you would already have had before.
It does make you better performing and possibly the code quality better, which is a good thing.
链接地址: http://www.djcxy.com/p/13066.html上一篇: 空条件运算符“取消”数组元素的存在
下一篇: 在使用C#6.0的功能时会有性能提升吗?