Fork me on GitHub

09 2014 档案
提高c++性能的编程技术笔记
摘要:需要时再创建对象,比如在类中用if new 而不是在构造函数里创建类的成员。用char 指针而不是string可以节省构造和析构string的开销。虚函数无法内联的性能损失。 阅读全文
posted @ 2014-09-22 00:07 huashiyiqike 阅读(189) 评论(0) 推荐(0)
修改代码的艺术笔记
摘要:使用单元测试使修改代码变得简单。在编程的时候考虑测试:使用类的方法来代替方法,这样可以通过在测试中编写继承类,改变相应方法的行为,达到避免执行某些函数的目的,更好的解依赖。使用包含预处理的头文件来制造接缝。#ifdef TESTING。。。 endif通过修改链接时的包含路径,另外的写专门用于测试的... 阅读全文
posted @ 2014-09-20 23:26 huashiyiqike 阅读(412) 评论(0) 推荐(0)
英语阅读笔记
摘要:1.Preview2.active reading, read with questions, take notes3.Recite and Review4.Change read rates according to purpose and familarity with topics 阅读全文
posted @ 2014-09-09 00:05 huashiyiqike 阅读(320) 评论(0) 推荐(0)
Linux下动态链接库 与gcc 选项
摘要:-L 编译时查找动态链接库的路径-lxxx(小写) e.g -lcudart = link libcudart.so ,-I(大写) 头文件的路径-rpath (-R), 编译时指定链接动态库的路径可以用ldd 看看是不有 ‘not found’在你链接的库后面,解决方法是通过-Wl,rpath=... 阅读全文
posted @ 2014-09-01 17:27 huashiyiqike 阅读(489) 评论(0) 推荐(0)