optimize
#pragma optimize( "[optimization-list]", {on | off} )

Feature Only in Professional and Enterprise Edition    Code optimization is supported only in Visual C++ Professional and Enterprise Editions. For more information, see Visual C++ Editions.

Specifies optimizations to be performed on a function-by-function basis. The optimize pragma must appear outside a function and takes effect at the first function defined after the pragma is seen. The on and off arguments turn options specified in the optimization-list on or off.

The optimization-list can be zero or more of the parameters shown in Table 2.2.

Table 2.2   Parameters of the optimize Pragma

Parameter(s) Type of optimization 
a Assume no aliasing. 
g Enable global optimizations. 
p Improve floating-point consistency. 
s or t Specify short or fast sequences of machine code. 
w Assume no aliasing across function calls. 
y Generate frame pointers on the program stack.

These are the same letters used with the /O compiler options. For example,

#pragma optimize( "atp", on )

Using the optimize pragma with the empty string (" ") is a special form of the directive. It either turns off all optimizations or restores them to their original (or default) settings.

#pragma optimize( "", off )
.
.
.
#pragma optimize( "", on )

C++ Release编译时如何对某段代码不进行优化的更多相关文章

  1. PHP验证时有用的几段代码

    1.htmlspecialchars() htmlspecialchars() 函数把一些预定义的字符转换为 HTML 实体.预定义的字符是: & (和号) 成为 & " ( ...

  2. Java 泛型优点之编译时类型检查

    Java 泛型优点之编译时类型检查 使用泛型代码要比非泛型代码更有优势,下面是 Java 官方教程对泛型其中一个优点的介绍: "Stronger type checks at compile ...

  3. Metalama简介2.利用Aspect在编译时进行消除重复代码

    上文介绍到Aspect是Metalama的核心概念,它本质上是一个编译时的AOP切片.下面我们就来系统说明一下Metalama中的Aspect. Metalama简介1. 不止是一个.NET跨平台的编 ...

  4. 使用编译时注解简单实现类似 ButterKnife 的效果

    这篇文章是学习鸿洋前辈的 Android 如何编写基于编译时注解的项目 的笔记,用于记录我的学习收获. 读完本文你将了解: 什么是编译时注解 APT 编译时注解如何使用与编写 举个例子 思路 创建注解 ...

  5. Visual Studio 2010编译时总是提示"调用目标发生了异常"的解决

    现象: 无论建立的是Win32 Console的解决方案,还是MFC的解决方案,重新打开Visual Studio 2010之后,编译时总是提示“调用的目标发生了异常” 解决: 1. 关闭Visual ...

  6. [BS-06] 设置release发布时NSLog不打印设置

    设置release发布时NSLog不打印设置 前提:在XCode做开发调试时往往需要打印一些调试信息做debug用,大家知道当打印信息的地方多了之后在模拟器上跑可能不会有什么问题,因为模拟器用的是电脑 ...

  7. 基于mipsel编译Qt4.6.2版本(有具体参数和编译时遇到的问题)

    1.使用的configure配置为:./configure -embedded mips -little-endian -xplatform qws/linux-mips-g++ -prefix /o ...

  8. apt 根据注解,编译时生成代码

    apt: @Retention后面的值,设置的为CLASS,说明就是编译时动态处理的.一般这类注解会在编译的时候,根据注解标识,动态生成一些类或者生成一些xml都可以,在运行时期,这类注解是没有的~~ ...

  9. Release编译模式下,事件是否会引起内存泄漏问题初步研究

    题记:不常发生的事件内存泄漏现象 想必有些朋友也常常使用事件,但是很少解除事件挂钩,程序也没有听说过内存泄漏之类的问题.幸运的是,在某些情况下,的确不会出问题,很多年前做的项目就跑得好好的,包括我也是 ...

随机推荐

  1. 吴伯凡:VUCA时代的自我迭代

    吴伯凡:VUCA时代的自我迭代 https://mp.weixin.qq.com/s?src=3&timestamp=1506588223&ver=1&signature=nv ...

  2. WordPress主题开发:输出指定页面导航

    实例: <ul> <li class="widget widget_nav_menu"> <?php if(is_page(array(12,14,1 ...

  3. (转)Fur Shader

    转自:http://qiankanglai.me/misc/2014/11/15/fur-shader/ 花时间看了下毛发效果,苦于囊中羞涩没能买QuickFur.furFX等插件,最后找到了Fur ...

  4. Recover database using backup controlfile until cancel

    http://searchoracle.techtarget.com/answer/Recover-database-using-backup-controlfile-until-cancel Wha ...

  5. 解决 Docker pull 出现的net/http: TLS handshake timeout 的一个办法

    echo "DOCKER_OPTS=\"\$DOCKER_OPTS --registry-mirror=http://f2d6cb40.m.daocloud.io\"&q ...

  6. 【转】《iOS7 by Tutorials》系列:iOS7的设计精髓(下)

    四.聚焦于内容 在iOS7里,强调的不是眼花缭乱的装饰效果,而是最重要的内容本身. 下面我们来探讨这个主题: 1.删除不必要的内容 伟大的设计更多是减法和加法的组合. 虽然很酷的想法是很重要,但还有更 ...

  7. Adobe Photoshop CC2019中文破解版

    今天突发兴致玩PS, 之前安装的是CS6, 下载安装色相环插件后 先采用拷贝文件夹的方式将Coolorus放到plug-in下, 重启发现窗口>扩展程序 这项是灰色的. 于是采用安装coolor ...

  8. SessionFactory 执行原生态的SQL语句

    public List<User> getPageIndex(int pageIndex,int topNum){ String hql = "select top(" ...

  9. php Date()函数输出中文年月日时分秒

    当然了,PHP的DATE函数是不可能直接输出中文的年月日的,但可以用下面这种方法自己写一个函数. 代码如下 复制代码 function today(){ date_default_timezone_s ...

  10. 译: 1. RabbitMQ Spring AMQP 之 Hello World

    本文是译文,原文请访问:http://www.rabbitmq.com/tutorials/tutorial-one-spring-amqp.html RabbitMQ 是一个Brocker (消息队 ...