文章分类 - C/C++
摘要:原文:http://en.wikipedia.org/wiki/Sequence_pointFrom Wikipedia, the free encyclopediaAsequence pointdefines any point in acomputer program'sexecutionat ...
阅读全文
摘要:原文:http://dreamrunner.org/blog/2014/07/05/multithreadingxiang-guan-zhu-yu-zong-jie/在谈到内存模型,Multithreading,尤其 lock-free programmming 等时,总会遇到一些相关术语来描述,如...
阅读全文
摘要:原文:http://dreamrunner.org/blog/2014/06/28/qian-tan-memory-reordering/Memory ordering在我们编写的 C/C++代码和它被在 CPU 上运行,按照一些规则,代码的内存交互会被乱序.内存乱序同时由编译器(编译时候)和处理器...
阅读全文
摘要:原文:http://msdn.microsoft.com/en-us/library/e7k32f4k.aspxProfile-guided optimization lets you optimize an output file, where the optimizer uses data fr...
阅读全文
摘要:原文:http://www.cmake.org/Wiki/CMake_FAQContents[hide]1General information and availability1.1What is CMake?1.2What is the current release?1.3I found a Bug! What should I do?1.4I want a new feature in CMake. What should I do?1.5What is the most recent version covered by the Mastering CMake book?1.6Whe
阅读全文
摘要:原文:http://code.google.com/p/gperftools/wiki/GooglePerformanceToolsGoogle Performance ToolsThe fastest malloc we've seen; works particularly well with threads and STL. Also: thread-friendly heap-checker, heap-profiler, and cpu-profiler.OverviewPerftools is a collection of a high-performance multi
阅读全文
摘要:原文:http://shiningray.cn/tcmalloc-thread-caching-malloc.html作者:Sanjay Ghemawat, Paul Menage原文翻译:ShiningRay动机TCMalloc要比glibc 2.3的malloc(可以从一个叫作ptmalloc2的独立库获得)和其他我测试过的malloc都快。ptmalloc在一台2.8GHz的P4机器上(对于小对象)执行一次malloc及free大约需要300纳秒。而TCMalloc的版本同样的操作大约只需要50纳秒。malloc版本的速度是至关重要的,因为如果malloc不够快,应用程序的作者就很有可能
阅读全文
摘要:原文:http://www.stroustrup.com/bs_faq2.html#abstract-classThese are questions about C++ Style and Technique that people ask me often. If you have better questions or comments on the answers, feel free to email me (bs at cs dot tamu dot edu). Please remember that I can't spend all of my time improv
阅读全文
摘要:原文:http://www.stroustrup.com/glossary.html#GscopeBjarne Stroustrup's C++ GlossaryModified October 3, 2012This is a glossary of C++ terms, organized alphabetically by concept.The definitions/explanations of individual terms are necessarily very brief. To compensate, each entry includes one or mor
阅读全文
摘要:原文:http://stackoverflow.com/questions/2224334/gcc-dump-preprocessor-definesuse -E -dM options instead of -c. Example (outputs them to stdout): gcc -dM -E -</dev/nullFrom the gcc manual:Instead of the normal output, generate a list of `#define' directives for all the macros defined during the
阅读全文
摘要:原文:http://graphics.stanford.edu/~seander/bithacks.htmlBit Twiddling HacksBy Sean Eron Andersonseander@cs.stanford.eduIndividually, thecode snippets here are in the public domain(unless otherwise noted) — feel free to use them however you please. The aggregate collection and descriptions are ©19
阅读全文
摘要:原文:http://stackoverflow.com/questions/318398/why-does-c-compilation-take-so-long/318440#318440Several reasons:Header files: Every single compilation unit requires hundreds or even thousands of headers to be 1: loaded, and 2: compiled. Every one of them typically has to be recompiled for every compil
阅读全文
摘要:原文:http://stackoverflow.com/questions/359237/why-does-c-not-have-reflectionThere are several problems with reflection in C++.It's a lot of work to add, and the C++ committee is fairly conservative, and don't spend time on radical new features unless they're sure it'll pay off. (A sug
阅读全文
摘要:原文:http://www.cnblogs.com/miloyip/archive/2010/09/17/behind_cplusplus.html在31年前(1979年),一名刚获得博士学位的研究员,为了开发一个软件项目发明了一门新编程语言,该研究员名为Bjarne Stroustrup,该门语言则命名为——C with classes,四年后改称为C++。C++是一门通用编程语言,支持多种编程范式,包括过程式、面向对象(object-oriented programming, OP)、泛型(generic programming, GP),后来为泛型而设计的模版,被发现及证明是图灵完备的,
阅读全文
摘要:原文:http://www.stroustrup.com/C++11FAQ.htmlThis document is written by and maintained by Bjarne Stroustrup. Constructive comments, corrections, references, and suggestions are of course most welcome. Currently, I'm working to improve completeness and clean up the references.Translations:Russian.C
阅读全文
摘要:原文:http://www.csdn.net/article/2012-08-13/2808540摘要:C++11标准在去年8月份获得一致通过,迄今为止已整整一年啦!这一年里C++11的发展情况如何呢?一起来看下C++11在VS11 (Visual Studio 2012)、g++ 4.7和Clang 3.1三大编译器支持情况。C++11标准在去年8月份获得一致通过,这是自1998年后C++语言第一次大修订,对C++语言进行了改进和扩充。迄今为止已整整一年啦!想知道C++11在这一年里的发展情况如何吗?本文我们一起来看下C++11在VS11 (Visual Studio 2012)、g++ 4
阅读全文
摘要:原文:http://mindhacks.cn/2012/08/27/modern-cpp-practices/过去的一年我在微软亚洲研究院做输入法,我们的产品叫“英库拼音输入法” (下载Beta版),如果你用过“英库词典”(现已更名为必应词典),应该知道“英库”这个名字(实际上我们的核心开发团队也有很大一部分来源于英库团队的老成员)。整个项目是微软亚洲研究院的自然语言处理组、互联网搜索与挖掘组和我们创新工程中心,以及微软中国Office商务软件部(MODC)多组合作的结果。至于我们的输入法有哪些创新的feature,以及这些feature背后的种种有趣故事… 本文暂不讨论。虽然整个过程中我也参
阅读全文
摘要:原文:http://www.cnblogs.com/Solstice/archive/2012/07/06/learncpp.html《C++ Primer 第4版 评注版》即将出版,这是序言。PDF 版见:https://github.com/downloads/chenshuo/documents/LearnCpp.pdf从《C++ Primer 第四版》入手学习 C++为什么要学习C++?2009年本书作者Stan Lippman先生来华参加上海祝成科技举办的C++技术大会,他表示人们现在还用C++的惟一理由是其性能。相比之下,Java/C#/Python等语言更加易学易用并且开发工具丰
阅读全文
摘要:原文:http://www.cnblogs.com/hzh1024n/archive/2009/09/17/1568357.html1.什么是库在windows平台和linux平台下都大量存在着库。本质上来说库是一种可执行代码的二进制形式,可以被操作系统载入内存执行。由于windows和linux的本质不同,因此二者库的二进制是不兼容的。本文仅限于介绍linux下的库。2.库的种类linux下的库有两种:静态库和共享库(动态库)。二者的不同点在于代码被载入的时刻不同。静态库的代码在编译过程中已经被载入可执行程序,因此体积较大。共享库的代码是在可执行程序运行时才载入内存的,在编译过程中仅简单的引
阅读全文
摘要:原文: http://dearymz.blog.163.com/blog/static/2056574201141883716608/第1章 Boost程序库总论使用Boost,将大大增强C++的功能和表现力第2章 时间与日期timer提供毫秒级的计时精度,内部是通过std::clock取时间的 progress_timer自动打印某生命周期的执行时间 原则上程序库的代码是不应该被用户修改的 progress_display可以在控制台上显示程序的执行进度 date_time库能很好的表示日期时间概念,并能和C的时间结构tm进行友好互转 date类提供年月日和星期几的概念。data可通过fro
阅读全文

浙公网安备 33010602011771号