What is the difference between the /Ox and /O2 compiler options?

混江龙づ霸主 提交于 2019-11-27 03:48:16
Alastair Maw

Asha's answer cites a blog post about Visual Studio 2005, and is rather out of date.

The latest version of the documentation is available here:

According to those:

You may additionally be interested in /GS- which turns off security checks around the stack, which can be a significant performance hit (see the MS docs for /GS).

You should benchmark your specific application, as ever.

I found it here:

Ox and O2 are almost identical. They differ only in the fact that O2 also throws GF and Gy. There is almost no reason to avoid throwing these two switches.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!