TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How much is the recent improvement in Firefox Quantum due to Rust?

18 点作者 lostPoncho超过 7 年前
What kind of role did Rust play at making Firefox fast, if any at all?

3 条评论

482794793792894超过 7 年前
The CSS engine was completely rewritten in Rust and now heavily utilizes parallelism, which Rust certainly did help with. I&#x27;d say, this was only about 1&#x2F;4 of the performance increase going from 56 to 57, though. (Based on my perception, having run Nightly as daily driver and being aware of when which bigger change got merged.)<p>The rest of the performance work was untied from Rust, as far as I&#x27;m aware.<p>Upcoming somewhen after 57 is also WebRender &#x2F; Quantum Render, which should give a significant boost to FPS. Basically, if you&#x27;ve ever wondered why your gaming PC can render out giant space warfares at 120 FPS, but your browser starts stuttering when that super cool menu animates itself, WebRender is going to fix that in principle.<p>So, there&#x27;s still going to be other problems, like JavaScript performance just not being on par with compiled code, but it should bring us a lot closer to the FPS that you&#x27;d expect.<p>(To throw in some technical terms, in case you want to research: Browsers so far used Immediate Mode to draw things, whereas WebRender and video games use Retained Mode.)<p>And WebRender was architectured as part of Servo, so is also written in Rust, but I can&#x27;t tell you, if Rust really benefitted work here, or if it just happens to be written in Rust.<p>This illustrates the sort of difference we&#x27;re looking at with WebRender: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=u0hYIRQRiws" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=u0hYIRQRiws</a><p>(Mind, though, that the video is more than a year old now. Firefox 57 should also already perform a lot better than what is shown in the video. Then again, WebRender is VSync-capped in the video...)
noncoml超过 7 年前
That’s an interesting question. Also do the Firefox engineers have any data&#x2F;feedback regarding Rust?<p>Was it easier to write code for the replaces parts with Rust? If yes in what way?<p>Any data&#x2F;metrics regarding bug counts on Rust vs C++ for the replaced components?
评论 #15381822 未加载
nwah1超过 7 年前
Very little right now, given that so few systems are built with it. And then, after more are converted, it will still be difficult to judge how much is a result of the language itself, and how much is a result of improved algorithms, gpu leveraging, and system design.<p>Rust itself is more about preventing bugs and security problems than improving performance.<p><a href="https:&#x2F;&#x2F;wiki.mozilla.org&#x2F;Oxidation" rel="nofollow">https:&#x2F;&#x2F;wiki.mozilla.org&#x2F;Oxidation</a>
评论 #15376769 未加载