2013年7月19日

fstrict-aliasing

摘要: 承如“optimization blocks”文中所述,由于相同的指针可能指向相关的内存区,因此编译器将不做过分的优化……特意搜了下编译器在不同的优化等级下都有哪些默认优化,因此有了此记录(比较长,尽管只讲述了fstrict-aliasing ……)下述内容引述自:http://dbp-consulting.com/tutorials/StrictAliasing.html http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html http://stackoverflow.co 阅读全文

posted @ 2013-07-19 22:51 阿加 阅读(4879) 评论(1) 推荐(0) 编辑

optimization blocks (csapp chapter 5.1)

摘要: p_511编译器在没有指示下,会做‘ safe optimization',因此有些优化在没有参数的指示下是不会对代码做优化的,故在程序中应该避免某一类代码,因为它们妨碍了编译器做优化。optimization blocks: aspects of programs that can severely limit the opportunities for a compiler to generate optimized code;两类optimization blocks:1、memory aliasing pointers may generate the same memory 阅读全文

posted @ 2013-07-19 22:25 阿加 阅读(310) 评论(0) 推荐(0) 编辑

导航