{"id":581,"date":"2014-12-11T14:36:08","date_gmt":"2014-12-11T19:36:08","guid":{"rendered":"http:\/\/zhanxw.com\/blog\/?p=581"},"modified":"2014-12-11T14:42:53","modified_gmt":"2014-12-11T19:42:53","slug":"%e5%8a%a0%e5%bf%abc%e7%bc%96%e8%af%91%e9%80%9f%e5%ba%a6","status":"publish","type":"post","link":"https:\/\/zhanxw.com\/blog\/2014\/12\/%e5%8a%a0%e5%bf%abc%e7%bc%96%e8%af%91%e9%80%9f%e5%ba%a6\/","title":{"rendered":"\u52a0\u5febC++\u7f16\u8bd1\u901f\u5ea6"},"content":{"rendered":"<p>\u52a0\u5febC++\u7f16\u8bd1\u901f\u5ea6<br \/>\nSpeed up C++ compiling speed<\/p>\n<p>\u5728\u5f00\u53d1<a href=\"http:\/\/zhanxw.github.io\/rvtests\/\" title=\"rvtests\">rvtests<\/a>\u65f6\uff0c\u5e38\u5e38\u9700\u8981\u91cd\u65b0\u7f16\u8bd1\u6574\u4e2a\u9879\u76ee\uff0c\u4f46\u662f\u8fd9\u662f\u4e2a\u8017\u8d39\u65f6\u95f4\u7684\u4e8b\u3002<\/p>\n<p>\u6bd4\u5982\uff0c\u7f16\u8bd1\u6700\u8017\u8d39\u65f6\u95f4\u7684regression\u5e93\uff0c\u7528\u201cmake\u201d\uff0c\u9700\u898150\u79d2\u3002<br \/>\n\u5728\u591aCPU\u7684\u673a\u5668\u4e0a\uff0c\u6253\u5f00\u5e76\u884c\u7f16\u8bd1\u9009\u9879\u540e\uff0c\u201cmake -j\u201d\uff0c\u9700\u898111\u79d2\uff08\u7cfb\u7edf\u65f6\u95f4\u662f11\u79d2\uff0c\u7528\u6237\u65f6\u95f4\u662f64\u79d2\uff09\u3002<\/p>\n<p>\u8fd9\u5c31\u662f\u8bf4\u91cd\u65b0\u7f16\u8bd1regression\u5e93\uff0c\u6700\u5feb\u4e5f\u898111\u79d2\u3002<\/p>\n<p>\u4eca\u5929\u6211\u53d1\u73b0\u6709\u4e00\u4e2a\u597d\u7528\u7684\u5de5\u5177\uff0c<a href=\"http:\/\/ccache.samba.org\/performance.html\" title=\"ccache\">ccache<\/a>\uff0c<br \/>\n\u53ef\u4ee5\u628a\u8fd9\u4e2a\u65f6\u95f4\u7f29\u5c0f\u52305\u79d2 \uff08\u52a0\u901f\u7f16\u8bd1\u901f\u5ea6\u4e00\u500d\uff09\u3002<br \/>\n\u65b9\u6cd5\u662f\u7528: <\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmake CXX=&quot;ccache g++&quot;\r\n<\/pre>\n<p>ccache\u9996\u6b21\u4f7f\u7528\u4f1a\u7a0d\u5fae\u6162\u4e00\u70b9\u3002\u56e0\u4e3a\u5b83\u4f1a\u7f13\u5b58\uff08cache\uff09\u6e90\u7a0b\u5e8f\u3002\u4f46\u4e4b\u540e\u7f16\u8bd1\u7684\u901f\u5ea6\u5c31\u53d8\u5f97\u98de\u5feb\u3002<br \/>\n\u6bd4\u5982\u4e0a\u9762\u7684\u65b9\u6cd5\u75285\u79d2\u3002\u5982\u679c\u8fd8\u60f3\u66f4\u5feb\uff0c\u6253\u5f00\u201c-j\u201d\u9009\u9879\uff0c\u53ea\u9700\u8981\u4e0d\u52301\u79d2\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u52a0\u5febC++\u7f16\u8bd1\u901f\u5ea6 Speed up C++ compiling speed \u5728\u5f00\u53d1rvtests\u65f6\uff0c\u5e38\u5e38\u9700\u8981\u91cd\u65b0\u7f16\u8bd1\u6574\u4e2a\u9879\u76ee\uff0c\u4f46\u662f\u8fd9\u662f\u4e2a\u8017\u8d39\u65f6\u95f4\u7684\u4e8b\u3002 \u6bd4\u5982\uff0c\u7f16\u8bd1\u6700\u8017\u8d39\u65f6\u95f4\u7684regression\u5e93\uff0c\u7528\u201cmake\u201d\uff0c\u9700\u898150\u79d2\u3002 \u5728\u591aCPU\u7684\u673a\u5668\u4e0a\uff0c\u6253\u5f00\u5e76\u884c\u7f16\u8bd1\u9009\u9879\u540e\uff0c\u201cmake -j\u201d\uff0c\u9700\u898111\u79d2\uff08\u7cfb\u7edf\u65f6\u95f4\u662f11\u79d2\uff0c\u7528\u6237\u65f6\u95f4\u662f64\u79d2\uff09\u3002 \u8fd9\u5c31\u662f\u8bf4\u91cd\u65b0\u7f16\u8bd1regression\u5e93\uff0c\u6700\u5feb\u4e5f\u898111\u79d2\u3002 \u4eca\u5929\u6211\u53d1\u73b0\u6709\u4e00\u4e2a\u597d\u7528\u7684\u5de5\u5177\uff0cccache\uff0c \u53ef\u4ee5\u628a\u8fd9\u4e2a\u65f6\u95f4\u7f29\u5c0f\u52305\u79d2 \uff08\u52a0\u901f\u7f16\u8bd1\u901f\u5ea6\u4e00\u500d\uff09\u3002 \u65b9\u6cd5\u662f\u7528: make CXX=&quot;ccache g++&quot; ccache\u9996\u6b21\u4f7f\u7528\u4f1a\u7a0d\u5fae\u6162\u4e00\u70b9\u3002\u56e0\u4e3a\u5b83\u4f1a\u7f13\u5b58\uff08cache\uff09\u6e90\u7a0b\u5e8f\u3002\u4f46\u4e4b\u540e\u7f16\u8bd1\u7684\u901f\u5ea6\u5c31\u53d8\u5f97\u98de\u5feb\u3002 \u6bd4\u5982\u4e0a\u9762\u7684\u65b9\u6cd5\u75285\u79d2\u3002\u5982\u679c\u8fd8\u60f3\u66f4\u5feb\uff0c\u6253\u5f00\u201c-j\u201d\u9009\u9879\uff0c\u53ea\u9700\u8981\u4e0d\u52301\u79d2\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-581","post","type-post","status-publish","format-standard","hentry","category-code"],"_links":{"self":[{"href":"https:\/\/zhanxw.com\/blog\/wp-json\/wp\/v2\/posts\/581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zhanxw.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zhanxw.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zhanxw.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/zhanxw.com\/blog\/wp-json\/wp\/v2\/comments?post=581"}],"version-history":[{"count":0,"href":"https:\/\/zhanxw.com\/blog\/wp-json\/wp\/v2\/posts\/581\/revisions"}],"wp:attachment":[{"href":"https:\/\/zhanxw.com\/blog\/wp-json\/wp\/v2\/media?parent=581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zhanxw.com\/blog\/wp-json\/wp\/v2\/categories?post=581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zhanxw.com\/blog\/wp-json\/wp\/v2\/tags?post=581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}