TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Chrome just got faster with Profile Guided Optimization

132 pointsby twapialmost 5 years ago

22 comments

mintplantalmost 5 years ago
Firefox has done this since forever. It's why official builds will generally be faster than compiling from scratch yourself. I'm surprised Chrome wasn't already taking advantage of PGO.
评论 #24275756 未加载
评论 #24274135 未加载
评论 #24274016 未加载
评论 #24275410 未加载
评论 #24278251 未加载
评论 #24275736 未加载
评论 #24277305 未加载
评论 #24274805 未加载
评论 #24274143 未加载
jawnsalmost 5 years ago
10% faster is a pretty nice improvement, especially in 2020.<p>Here&#x27;s a little Wikipedia stub about Profile-Guided Optimization, for those who&#x27;d like to read more about the technique.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Profile-guided_optimization" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Profile-guided_optimization</a>
评论 #24273610 未加载
评论 #24274840 未加载
londons_explorealmost 5 years ago
Where are the profiles gathered from?<p>Did they just render the alexa top 1M sites and generate a profile from that? It would seem some bits of the codebase might only be exercised by real users (eg. touch input during a mobile game).<p>Did they instead gather PGO information from real users? If so, how did they do that in a way to not degrade performance too much while profiling, and maintaining user privacy (sequences and addresses of branches in some cases will reveal user data)?
评论 #24273623 未加载
评论 #24273588 未加载
jeffbeealmost 5 years ago
FWIW, ChromeOS has been built with PGO for many years. This is catch-up for the mac toolchain.
XCSmealmost 5 years ago
&gt; Tab throttling coming to Beta<p>This is nice, but I remember the pain trying make a multiplayer browser game run fine, even when you put it in a background tab. The problem is that the game had matchmaking, so players would change tabs while a match was found and for the first few seconds of the start of the game. While doing so, many of the CSS animations, sounds, JavaScript functions would be queued and all executed at once when you switched back to the tab, leading to a bad experience, or in some cases the game breaking. I assume this would only get worse with this tab throttling feature, but there are legitimate use cases where both developers and users would prefer a tab to still be running at normal speed even when not focused. We use this every day in desktop applications, where we start a game or some video encoding task and just let it run, non-throttled, in the background
评论 #24275863 未加载
Andrew_nenakhovalmost 5 years ago
Sigh. I used to love Chromium, when it was the new kid on the block. But now, because of this browser monoculture, I wouldn&#x27;t use it even if it was far better than Firefox.<p>How times change.
londons_explorealmost 5 years ago
What do these profiles consist of? Simply which branches are taken vs not taken? Or do they include a history (eg. if this branch is taken then that one will not be)?<p>Do they depend on the stack? Ie. when called from this function, that branch is always taken. That could encourage the compiler to inline the function so it can have a faster path on the branch.
评论 #24275173 未加载
评论 #24273774 未加载
rat9988almost 5 years ago
It sees it was already used for windows: <a href="https:&#x2F;&#x2F;blog.chromium.org&#x2F;2016&#x2F;10&#x2F;making-chrome-on-windows-faster-with-pgo.html" rel="nofollow">https:&#x2F;&#x2F;blog.chromium.org&#x2F;2016&#x2F;10&#x2F;making-chrome-on-windows-f...</a>
评论 #24277614 未加载
crazygringoalmost 5 years ago
Sorry for the elementary question...<p>...but is PGO referring to the compilation of Chrome itself, or the compilation of JavaScript on sites?<p>The blog post doesn&#x27;t actually specify which compilation is being talked about, and page performance could obviously depend on either.
评论 #24274955 未加载
评论 #24274994 未加载
tmshalmost 5 years ago
<a href="https:&#x2F;&#x2F;github.com&#x2F;greatsuspender&#x2F;thegreatsuspender" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;greatsuspender&#x2F;thegreatsuspender</a> is great on Chrome (up until now).
Avamanderalmost 5 years ago
One can hope that Linux would see similar optimizations applied to it at some point.
评论 #24276139 未加载
评论 #24275891 未加载
gnramiresalmost 5 years ago
I wonder how far we can take this sort of effort -- collect exact usage statistics for users and optimize software exactly for known usage patterns. Of course some statistical technique would be needed to deal with the long tail of usage patterns -- surely some program branches are used extremely rarely (or not even seen in collected samples), but you still wouldn&#x27;t want them to be extremely slow (slower than necessary) or crash just because they&#x27;re rarely used. The cumulative usage of many of those long tail events can be large.<p>Either (regularized) statistical inference of branches or something like assuming a baseline usage for every branch would be necessary.<p>This is all significantly complex of course, so for anything that are not the consumer megaprojects of software (browsers and operating systems?), I wonder if those tools could be used as well. Perhaps there could be some automated, anonymized usage reporting that does all this work?
评论 #24274300 未加载
评论 #24273477 未加载
freediveralmost 5 years ago
Chrome 87 vs Safari 14 on macOS Big Sur benchmark:<p><a href="https:&#x2F;&#x2F;imgur.com&#x2F;a&#x2F;gUX2CIF" rel="nofollow">https:&#x2F;&#x2F;imgur.com&#x2F;a&#x2F;gUX2CIF</a><p>Safari&#x2F;Webkit still the &quot;fastest browser possible&quot; on macOS.
gnivalmost 5 years ago
This is supposed to roll out today: <a href="https:&#x2F;&#x2F;www.chromestatus.com&#x2F;features&#x2F;schedule" rel="nofollow">https:&#x2F;&#x2F;www.chromestatus.com&#x2F;features&#x2F;schedule</a>
Santosh83almost 5 years ago
Will this filter down to MS Edge eventually?
评论 #24274197 未加载
评论 #24274814 未加载
XCSmealmost 5 years ago
Unrelated: my Chrome (on Windows) randomly freezes for 1-2 seconds whenever I focus one tab&#x2F;window after I am away from it for a while. Is there any way to debug those kind of freezes?
blackflame7000almost 5 years ago
Chrome used to be a light weight fast browser and now it feels the need to use a GB of RAM to show a single new tab window.
评论 #24274797 未加载
评论 #24274437 未加载
sa46almost 5 years ago
Does PGO support reproducible builds? If you pass the same profile at compile time do you get the same binary?
coding123almost 5 years ago
Except on OnePlus where it just freezes randomly for 10 seconds unless you switch tasks and switch back.
评论 #24275718 未加载
评论 #24274759 未加载
The_rationalistalmost 5 years ago
Will it be enabled on Android before Linux?
callmealalmost 5 years ago
So, HotSpot then?
评论 #24274988 未加载
评论 #24274597 未加载
评论 #24277664 未加载
sadfevalmost 5 years ago
Wonderful!<p>Chromium is an excellent project but just sometimes slow to adopt certain features.<p>I love chrome and chromium browsers, I hardly have any issues with them.<p>Unlike garbage FF and unreliable Safari