2012年3月1日

C++辅助工具 ZZ

摘要: 1 文档类 (1) Doxygen 参考站点:http://www.doxygen.org/ Doxygen是一种适合C风格语言(如C++、C、IDL、Java甚至包括C#和PHP)的、开放源码的、基于命令行的文档产生器。 (2) C++2HTML 参考站点:http://www.bedaux.net/cpp2html/ 把C++代码变成语法高亮的HTML (3) CodeColorizer 参考站点:http://www.chami.com/colorizer/ 它能把好几种语言的源代码着色为HTML (4) Doc-O-Matic 参考站点:h... 阅读全文

posted @ 2012-03-01 15:14 burellow 阅读(423) 评论(0) 推荐(0) 编辑

Optimizing C and C++ Code ZZ

摘要: Optimizing C and C++ Code Embedded software often runs on processors with limited computation power, thus optimizing the code becomes a necessity. In this article we will explore the following optimization techniques for C and C++ code developed for Real-time and Embedded Systems.Adjust structure si 阅读全文

posted @ 2012-03-01 14:18 burellow 阅读(189) 评论(0) 推荐(0) 编辑

C/C++性能优化 ZZ

摘要: 任务:把一个小头(little endian)的整型(32bit)转化为大头(big endian)。我们需要这样一个函数 void foo(unsigned int &u); 用来颠倒整数u的字节序。类似于socket函数htonl()或者ntohl()。也就是说,在以某个整数u为参数调用foo以后,u小头变大头,或者反过来。这无所谓,因为小头和大头是对称的。我发现对这个简单的任务,采用不同的作法,效率能差到很多,这两天研究了一下,写一点心得出来与同好分享。第一种作法:extern "C" void f1(unsigned int &u){ unsigne 阅读全文

posted @ 2012-03-01 14:16 burellow 阅读(592) 评论(0) 推荐(0) 编辑

导航