{"id":1206,"date":"2013-07-08T11:12:24","date_gmt":"2013-07-08T15:12:24","guid":{"rendered":"http:\/\/yuguangzhang.com\/blog\/?p=1206"},"modified":"2013-07-08T11:12:24","modified_gmt":"2013-07-08T15:12:24","slug":"phoronix-gcc-graphite-and-lto-benchmarks","status":"publish","type":"post","link":"http:\/\/yuguangzhang.com\/blog\/phoronix-gcc-graphite-and-lto-benchmarks\/","title":{"rendered":"Phoronix GCC Graphite and LTO Benchmarks"},"content":{"rendered":"<p>GCC <a href=\"http:\/\/gcc.gnu.org\/wiki\/Graphite-4.8\">Graphite<\/a> and <a href=\"http:\/\/gcc.gnu.org\/wiki\/LinkTimeOptimization\">Link Time Optimization<\/a>\u00a0are new features that many Gentoo users do not enable because they have not been proven to improve performance. I recently did a fresh install of Funtoo optimized for Core i7 and a recompile of the system to run Phoronix benchmarks. Before we look at the benchmarks, it is imperative to note that Phoronix is not intended to test the performance of programs compiled with certain sets of GCC flags. The test suite documentation states,<\/p>\n<blockquote><p>&#8230; for the software being tested that may be installed already on the system by the user, the Phoronix Test Suite will ignore those installations. The Phoronix Test Suite installs all tests within its configured environment to improve the reliability of the testing process.<\/p><\/blockquote>\n<p>which means the test suite disables system-wide GCC flags for test packages. So out of the tests I ran, only the ones that tested the packages compiled with Graphite and LTO enabled are worth looking at, and these are PyBench and gzip compression. Of the other tests, video and audio encoding as well as the lzma compression are built using the make command, which bypasses the Gentoo build system. If we look at the individual test packages, <a href=\"http:\/\/openbenchmarking.org\/innhold\/59a3cc405e94d7c0b23896c803815ebe2dcbbbea\">the lzma package<\/a> downloads the lzma source<br \/>\n[cc lang=&#8221;xml&#8221;]<br \/>\n<?xml version=\"1.0\"?><br \/>\n<!--Phoronix Test Suite v3.0.0a3 (Iveland) [ http:\/\/www.phoronix-test-suite.com\/ ]--><br \/>\n<PhoronixTestSuite><br \/>\n  <Downloads><br \/>\n    <Package><br \/>\n      <URL>http:\/\/mirror.internode.on.net\/pub\/gentoo-portage\/distfiles\/lzma-4.32.6.tar.gz, http:\/\/buildroot.uclibc.org\/downloads\/sources\/lzma-4.32.6.tar.gz<\/URL><br \/>\n      <MD5>211d6207fdd7f20eaaae1bbdeb357d3a<\/MD5><br \/>\n      <FileSize>478661<\/FileSize><br \/>\n    <\/Package><br \/>\n  <\/Downloads><br \/>\n<\/PhoronixTestSuite><br \/>\n[\/cc]<br \/>\nand builds it without using Gentoo&#8217;s package manager. That means it doesn&#8217;t use the GCC optimization flags.<br \/>\n[cc lang=&#8221;bash&#8221;]<br \/>\n#!\/bin\/sh<\/p>\n<p>mkdir $HOME\/lzma_<\/p>\n<p>tar -zxvf lzma-4.32.6.tar.gz<br \/>\ncd lzma-4.32.6<br \/>\n.\/configure &#8211;prefix=$HOME\/lzma_<br \/>\nmake -j $NUM_CPU_JOBS<br \/>\necho $? > ~\/install-exit-status<br \/>\nmake install<br \/>\ncd ..<br \/>\nrm -rf lzma-4.32.6<\/p>\n<p>cat > compress-lzma <<EOT\n#!\/bin\/sh\n.\/lzma_\/bin\/lzma -q -c .\/compressfile > \/dev\/null 2>&#038;1<br \/>\nEOT<br \/>\nchmod +x compress-lzma<br \/>\n[\/cc]<br \/>\nOn the other hand, <a href=\"http:\/\/openbenchmarking.org\/innhold\/94f36c1757ae5e0b5cf883edf2da2806797c63e8\">the gzip package<\/a> doesn&#8217;t require any downloads and uses the system&#8217;s gzip<br \/>\n[cc lang=&#8221;bash&#8221;]<br \/>\n#!\/bin\/sh<\/p>\n<p>cat > compress-gzip <<EOT\n#!\/bin\/sh\ncat compressfile | gzip -c > \/dev\/null 2>&#038;1<br \/>\nEOT<br \/>\nchmod +x compress-gzip<br \/>\n[\/cc]<br \/>\nAt last, we are ready to understand the results, which do indicate that these new GCC features improve performance.<br \/>\n<a href=\"http:\/\/openbenchmarking.org\/result\/1307063-UT-GCCOPTIMI03\">http:\/\/openbenchmarking.org\/result\/1307063-UT-GCCOPTIMI03<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>GCC Graphite and Link Time Optimization\u00a0are new features that many Gentoo users do not enable because they have not been proven to improve performance. I recently did a fresh install of Funtoo optimized for Core i7 and a recompile of the system to run Phoronix benchmarks. Before we look at the benchmarks, it is imperative [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[5],"tags":[191,104,192,193],"class_list":["post-1206","post","type-post","status-publish","format-standard","hentry","category-linux","tag-gcc","tag-gentoo","tag-graphite","tag-lto"],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/yuguangzhang.com\/blog\/wp-json\/wp\/v2\/posts\/1206","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/yuguangzhang.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yuguangzhang.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yuguangzhang.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/yuguangzhang.com\/blog\/wp-json\/wp\/v2\/comments?post=1206"}],"version-history":[{"count":0,"href":"http:\/\/yuguangzhang.com\/blog\/wp-json\/wp\/v2\/posts\/1206\/revisions"}],"wp:attachment":[{"href":"http:\/\/yuguangzhang.com\/blog\/wp-json\/wp\/v2\/media?parent=1206"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yuguangzhang.com\/blog\/wp-json\/wp\/v2\/categories?post=1206"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yuguangzhang.com\/blog\/wp-json\/wp\/v2\/tags?post=1206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}