Performance differences between debug and release builds

前端 未结 8 1395
迷失自我
迷失自我 2020-11-21 22:48

I must admit, that usually I haven\'t bothered switching between the Debug and Release configurations in my program, and I have usually opted to go for the

8条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-21 22:54

    1. Yes, there are many performance differences and these really apply all over your code. Debug does very little performance optimization, and release mode very much;

    2. Only code that relies on the DEBUG constant may perform differently with a release build. Besides that, you should not see any problems.

    An example of framework code that depends on the DEBUG constant is the Debug.Assert() method, which has the attribute [Conditional("DEBUG)"] defined. This means that it also depends on the DEBUG constant and this is not included in the release build.

提交回复
热议问题