Are there risks to optimizing code in C#?

后端 未结 8 899
粉色の甜心
粉色の甜心 2020-12-18 18:53

In the build settings panel of VS2010 Pro, there is a CheckBox with the label \"optimize code\"... of course, I want to check it... but being unusually cautious, I asked my

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-18 19:26

    The optimizations shouldn't really break your code. There's a post here by Eric Lippert which explains what happens when you turn that flag on. The performance gain will vary from application to application, so you'll need to test it with your project to see if there are any noticeable differences (in terms of performance).

提交回复
热议问题