<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>chys&#039;s random notes &#187; browser</title>
	<atom:link href="http://en.chys.info/tag/browser/feed/" rel="self" type="application/rss+xml" />
	<link>http://en.chys.info</link>
	<description>Study more problems; Talk less of isms.</description>
	<lastBuildDate>Tue, 27 Dec 2011 11:56:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>I can&#8217;t PGO compile Firefox</title>
		<link>http://en.chys.info/2009/07/i-cannot-pgo-compile-firefox/</link>
		<comments>http://en.chys.info/2009/07/i-cannot-pgo-compile-firefox/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 20:21:57 +0000</pubDate>
		<dc:creator>chys</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[GCC]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://en.chys.info/?p=610</guid>
		<description><![CDATA[A normal build of Firefox for Linux is reportedly even slower than the Win32 binary running under Wine. The reason is reportedly that the pre-compiled binary for Windows uses PGO (profile guided optimization), which is usually not enabled under Linux. Sure, the fact that GCC does not generate as efficient codes as VC may also [...]<hr/>
Related posts:<ol>
<li><a href='http://en.chys.info/2009/03/ext4-data-loss/' rel='bookmark' title='Ext4 data loss'>Ext4 data loss</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A normal build of Firefox for Linux is <a href="http://www.reddit.com/r/programming/comments/7x8mz/even_wine_beats_linux_firefox/">reportedly</a> even slower than the Win32 binary running under Wine.</p>
<p>The reason is reportedly that the pre-compiled binary for Windows uses PGO (<a href="http://en.wikipedia.org/wiki/Profile-guided_optimization">profile guided optimization</a>), which is usually not enabled under Linux. Sure, the fact that GCC does not generate as efficient codes as VC may also be a reason.[1]</p>
<p>Firefox also <a href="https://developer.mozilla.org/en/Building_with_Profile-Guided_Optimization">supports</a> PGO in Linux. However, I failed at this (3.5.1). The profile-generating binary always segfaults.</p>
<p><a href="http://bbs.archlinux.org/viewtopic.php?pid=579961">Other people</a> have encountered the same problem, even with the official PKGBUILD from Arch Linux. It is said to be a compiler problem.</p>
<p>Well, gave up. Maybe I&#8217;ll try it again some time later, with a more &#8220;stable&#8221; version of GCC probably.</p>
<p>[1] This statement only applies to the 32-bit platform. It seems GCC does a very good job on x86-64.</p>
<hr/>
<p>Profile-guided optimization is a relatively new feature. GCC began supporting it starting version 4.0; Microsoft VC 2005; and Intel C/C++/Fortran 9 (?).</p>
<p>A typical PGO-enabled building requires three steps:</p>
<p>(1) Build a profile-generating binary;<br />
(2) Run the binary, which automatically collects useful data &#8211; branch probability, etc.<br />
(3) Rebuild the program, using the data (“profile”) from Step 2.</p>
<p>With PGO, Internet Explorer <a href="http://gemal.dk/blog/2008/03/04/firefox_3_with_profileguided_optimization_speeding_ticket/">reportedly</a> gains an improvement of 8%, and Firefox 11% in JavaScript.</p>
<hr/><p>Related posts:<ol>
<li><a href='http://en.chys.info/2009/03/ext4-data-loss/' rel='bookmark' title='Ext4 data loss'>Ext4 data loss</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://en.chys.info/2009/07/i-cannot-pgo-compile-firefox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

