22 ms·
Firefox's JIT is getting significantly faster
- PaulHoule 6y agoHere is the link that doesn't require a Google login: https://archive.is/SFFph https://archive.is/SFFph
- jiripospisil 6y agoThank you. Unfortunately it won't let me update the link anymore.
- 5- 6y agothank you! interestingly a very similar link appears to not require a google login, but requires javascript: https://groups.google.com/d/topic/mozilla.dev.platform/1PHhxBxSehQ https://groups.google.com/d/topic/mozilla.dev.platform/1PHhx... i wonder what's going on.
- jeroenhd 6y agoThis did ask me to log in. It doesn't in private mode though. I think if Google detects that you've _ever_ logged into Google, it's trying to authenticate you when you visit a Google Groups page. Private mode is my default workaround for Google Groups links these days.
- dang 6y agoWeird! But thanks - we've changed to that from https://groups.google.com/g/mozilla.dev.platform/c/1PHhxBxSehQ https://groups.google.com/g/mozilla.dev.platform/c/1PHhxBxSe....
- The_rationalist 6y agoTldr +~10% If only they could merge with V8 progress would actually reach everyone If mozilla wanted to be disruptive they should attempt to make https://github.com/graalvm/graaljs https://github.com/graalvm/graaljs production ready. The JVM has gotten much more human resources at optimizations than either v8 or smonkey and it is an open question how much could it outperform v8.
- speedgoose 6y agoThe last thing I want in my browser is a JVM.
- johnnycerberus 6y agoThere's already a VM. If Graal really brings better performance then I don't mind.
- vips7L 6y agoI wonder if anyone is already trying to build that. A browser based on graaljs and java rendering engine. I wonder if you could take firefox mobile and do it. I'm assuming its html/css rendering engine is in Java/Kotlin.
- 1f60c 6y agoWhy?
- sk2020 6y agoMaybe I'm just ignorant, but haven't browsers nearly become just a VM for JavaScript? Rendering documents is sometimes incidental. I'm not sure Swing would actually be worse than HTML5.
- remram 6y agoLayout is actually difficult and offers a great many interesting problems when you try to parallelize it or efficiently use GPU acceleration. There are a lot of constraints and text is difficult to size and render.
- The_Colonel 6y agoAgreed, layout is probably more difficult problem and definitely the area with more potential for improvements ("forced reflow" anyone?) whereas JS engines are already at the point of quickly diminishing returns.
- deleted 6y ago[deleted]
- acqq 6y agoThe current title ("significantly faster") on HN is suboptimal. What is there written relating the speed is that the new implementation: "improves responsiveness and page load performance significantly (we're seeing 5-15% improvements on many visual metrics tests). Speedometer is about 10% faster with Warp." "Warp is currently slower on various synthetic JS benchmarks such as Octane (which we will continue investigating in the coming months) but should perform well on web content." It seems it can in the longer term generally improve though, and simplifications are always better.
- est31 6y ago5-15% on web content is significantly faster to me. Also, like many people, I mainly use my browser for visiting websites instead of running things like Octane, but obviously it would be nicer if Octane were faster too.
- coldtea 6y ago>5-15% on web content is significantly faster to me. Is it though? Would you even notice it? If there was an already short processing action, e.g. 1 second, now it would be 850ms -- hardly noticable. If there was some long processing action, say 5 minutes, now it would take 4 minutes and 25 seconds. Hardly something to write home about in either case...
- bjoli 6y agoIf I were to squeeze 10% out of a project I had spent significant time and resources optimizing I would be thrilled.
- coldtea 6y agoYou and me yes. Users though not so much, because they already know the optimized previous performance, so they just see a meagre 10% over it -- that it's hard to optimize something already optimized and thus 10% is a feet is not relevant to their perception.
- jjordan 6y agoIt's nice to see some actual good news involving Firefox. With all of the leadership and financial struggles lately, it's made me worry that the browser I've been using for the last 17 years doesn't have long to live. Hopefully that is not the case.
- ATsch 6y agoI think it will take more time to say that for certain. Warp is an exception, but most of the recent improvements to Firefox were initially prototyped and developed in the experimental Servo engine which was to my knowledge intended to eventually replace all of gecko. Most of the team for that has been let go. I think the thing to be worried about is: what will happen when they run out of stuff that's already in the pipeline? Will they be able to execute the sweeping changes they'll need to do to stay within reach of blink long term? Or will they have to concede like opera and edge did.
- IainIreland 6y ago> most of the recent improvements to Firefox were initially prototyped and developed in the experimental Servo engine which was to my knowledge intended to eventually replace all of gecko. Most of the team for that has been let go. This is not the case. Servo worked on big experimental moonshot projects. They had some major successes (Stylo, WebRender), but the rest of the Firefox team wasn't sitting around twiddling their thumbs. I don't think Servo ever made up more than a small fraction of the overall Firefox workforce. They had to pick and choose their projects. Note, for example, that Servo embeds SpiderMonkey instead of writing its own JS engine from scratch: https://github.com/servo/rust-mozjs https://github.com/servo/rust-mozjs Don't worry! SpiderMonkey still has additional cool projects coming down the pipeline, none of which are dependent on Servo.
- cpeterso 6y agoThis is correct. Servo's Stylo parallelized CSS parser shipped in Firefox's "Quantum" performance release, but a huge part of the overall performance improvement came from profiling the whole system. Fixing lots of small hot spots in Firefox frontend and Gecko really added up. It's easy for tiny performance regressions to creep in here and there.
- est31 6y agoNice! There's still cool cpp stuff going on in Firefox. This is one example. https://searchfox.org/mozilla-central/source/js/src/jit/WarpBuilder.cpp https://searchfox.org/mozilla-central/source/js/src/jit/Warp...
- LeSaucy 6y agoThat’s a 3300 line cpp file, care to cite a specific example?
- est31 6y agoThe entire file contains WarpBuilder, which is behind the JIT speedup that this thread is about. > The SpiderMonkey (JS) team has been working on a significant update to > our JITs called WarpBuilder (or just Warp) [0,1]. The whole component was the cool stuff I was referring too. I linked it mainly to show that it's C++ instead of, say, Rust, not to highlight any component of it.
- deleted 6y ago[deleted]
- winrid 6y agoI was thinking new stuff was done in Rust. I guess Gecko is CPP only?
- richdougherty 6y agoI think some Rust components have been written and integrated into Firefox. But the core Firefox codebase - including Gecko - is still C++ so it's not easy use Rust there. https://wiki.mozilla.org/Oxidation https://wiki.mozilla.org/Oxidation On a related note, Chrome is looking at integrating Rust into its C++ codebase. https://www.chromium.org/Home/chromium-security/memory-safety/rust-and-c-interoperability https://www.chromium.org/Home/chromium-security/memory-safet...
- stjohnswarts 6y agoNot true majority by far is done in c++. Easily confirmed by downloading the browser source and using a LOC analyzer to see how much code is done in which languages
- superkuh 6y agoThat's browsers for you these days. They ignore browsing features and concentrate on being a faster javascript engine for buying things and streaming video. I'd say more but that google groups link requires logging in to a google acount.
- GordonS 6y agoWhat browser features do you think are missing? Other than perhaps some love for containers, I can't think of anything else I want for. In honesty, it feels like they've been making UI tweaks for the sake of it for a while now; if anything, I'd like some to be rolled back! I'm quite happy to see performance improvements - I'd love to see more on the memory reduction side of things too.
- noxer 6y agoLink goes to google login page - please don't just don't ever do this again.
- Santosh83 6y agoFor everyone unable or unwilling to login:- Hi all, The SpiderMonkey (JS) team has been working on a significant update to our JITs called WarpBuilder (or just Warp) [0,1]. Before we enable Warp by default in Nightly (hopefully next cycle in 83) we need your help dogfooding it. Warp improves performance by reducing the amount of internal type information that is tracked, optimizing for a broader spectrum of cases, and by leveraging the same CacheIR optimizations used by last year’s BaselineInterpreter work [2]. As a result, Warp has a much simpler design and improves responsiveness and page load performance significantly (we're seeing 5-15% improvements on many visual metrics tests). Speedometer is about 10% faster with Warp. The JS engine also uses less memory when Warp is enabled. To enable Warp in Nightly: 1. Update to a recent Nightly 2. Go to about:config and set the "javascript.options.warp" pref to true 3. Restart the browser We're especially interested in stability issues and real-world performance problems. Warp is currently slower on various synthetic JS benchmarks such as Octane (which we will continue investigating in the coming months) but should perform well on web content. If you find any issues, please file bugs blocking: https://bugzilla.mozilla.org/show_bug.cgi?id=1613592 https://bugzilla.mozilla.org/show_bug.cgi?id=1613592 If you notice any improvements, we'd love to hear about those too. Finally, we want to thank our amazing contributors André Bargull and Tom Schuster for their help implementing and porting many optimizations. Turning Warp on is only our first step, and we expect to see a lot of new optimization work over the next year as we build on this. We are excited for what the future holds here. Thanks! The Warp team [0] WarpBuilder still utilizes the backend of IonMonkey so we don't feel it has earned the WarpMonkey name just yet. [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1613592 https://bugzilla.mozilla.org/show_bug.cgi?id=1613592 [2] https://hacks.mozilla.org/2019/08/the-baseline-interpreter-a-faster-js-interpreter-in-firefox-70/ https://hacks.mozilla.org/2019/08/the-baseline-interpreter-a...
- JohnBooty 6y agoFWIW, it was already enabled for me in Nightly on MacOS - 83.0a1 (2020-09-25) (64-bit) Thanks for all of your hard work. Firefox forever!
- coldtea 6y agoNormally it would be good news. Given the recent news though, I feel more like commenting: Titanic's band also got much better musicians as they practiced more on the deck...
- SubiculumCode 6y agoI believe in Mozilla.and their products. as much as they need to get their admin/ceo pay down.as much as they need to adjust the new Android Firefox UI Unless there is another foundation with a browser promoting a free and open internet, my vote will always remain with them.
- admiral33 6y agoWhy does the ceo pay need to go down?
- Zekio 6y agoHer pay is currently IIRC 2.4 million dollars a year
- throw_m239339 6y ago> Why does the ceo pay need to go down? Because salary X4 didn't result in financial performance X4, just 250 people fired.
- foobiekr 6y agoThe problem with your view is that the purpose of most nonprofits, as revealed by their actual spending, is to act as a well-paying job for their administrators and a volunteer/exploitation scheme. They aren’t really about the mission. This is as clear as it could be for Mozilla.
- mgbmtl 6y agoThere's a catch-22 in there, a touch of cynicism, which I understand. However, ideally you want well paid employees who are not exploiting volunteers? I doubt there are many stats on this, but my experience is that most nonprofits don't exploit volunteers. Firefox rolls out solid releases and improvements, month after month. Presumably that means that their employees are doing something good somewhere? I know there are a ton of essential volunteers too, but the project would struggle without a paid core and infra. As a developer and as a user, I get a lot of value for free out of Firefox. I barely do anything to give back, except perhaps to try and 'push it forward' in the FOSS project I am partially paid to work on. In our project, I get a bit rattled when people say we are going against their interests, when we have to make choices to ensure the financial stability of the project, and also to respond to requests from the greater (less-vocal) community. I'm obviously partial, but I'll give Firefox/Mozilla the benefit of the doubt.
- HashingtheCode 6y agoFirefox is a dead man walking. If you want privacy, use a FF fork called Librewolf
- Rolcol 6y agoYou claim it's dead, but suggest using a fork that can't hope to keep up if Firefox dies? They benefit from all the architectural improvements done to Firefox, including this.
- HashingtheCode 6y agoYou don't have a high opinion of the LibreWolf team. Did you know that I can still use a web browser from the last decade to surf websites? Yup. Even if FF dies, the codebase is opensource and continue to be developed.
- danso 6y agoThe repo's members page [0] shows 9 users, and the first bullet point on its features page [1] is: LibreWolf is compiled directly from the latest build of Firefox Stable. You will have the the latest features, and security updates.. You believe a small group of well-intentioned volunteers can continue the work of building and iterating a modern web browser were Firefox development to end today? [0] https://gitlab.com/groups/librewolf-community/browser/-/group_members https://gitlab.com/groups/librewolf-community/browser/-/grou... [1] https://librewolf-community.gitlab.io/docs/ https://librewolf-community.gitlab.io/docs/
- HashingtheCode 6y agoIt's possible, maybe not very likely but possible. Depends what happens to FF.
- Miraste 6y agoNo, it's not. Mozilla has 750 employees (not all of whom work on the browser, but still) and hundreds of millions of dollars and they're constantly struggling to keep up with Chrome. 9 part-time devs cannot do this.
- pizlonator 6y agoThat’s a nice Speedometer speedup! Really happy for the FF JS team, seems like they are on to something.
- peanut_worm 6y agoLower memory consumption too. This is good news, I am worried for the future of Mozilla and Firefox.
- rattray 6y ago10% faster with less memory use and simpler code / data models - nice work! Excited to see the end result. Hopefully HN users on nightly are able to try it out and give feedback.
- indolering 6y agoHow does this impact security? Most of the proposals I've seen for improving Firefox's security requires more memory and the blurb on the mailing list cite that they require less type information.
- vorticalbox 6y agoProbably not directly however simpler code usually has less bugs and is quicker to debug.
- squarefoot 6y agoThey well deserve some donations, and I just sent some quid, but would also buy some merchandise for me and gifts for friends/relatives if shipping costs make it worth, but apparently there's no way to purchase from them. A search brought some sites selling Mozilla branded items, but I'd like to be sure the money, or most of it, goes to the Mozilla Foundation. Any suggestions? Thanks.
- butz 6y agoWould be great if Firefox set up monthly donations system on Patreon, OpenCollective or similar platform, and all donations would go directly to browser development.
- jonnytran 6y agoI would totally pay a yearly subscription to support Firefox, ideally giving me access to hosted features like Firefox Send (end-to-end encrypted sending of files). I realize that people who would do so are a minority. But maybe that would help solidify the idea that, while Chrome is for Google, Firefox is for its users.
- toyg 6y agoA bunch of random ideas: - partner with Dropbox to offer an integrated web-based filesystem and other file-oriented stuff like Send. - partner with bitwarden or 1Password to provide integrated authentication - the web desperately needs an open competitor to Google/Fb/Apple in this area, I’d definitely pay for this. They could probably just repurpose Persona. - rebrand Pocket (which, let’s be honest, has pissed off too many people to ever succeed) and use it to build something like old del.icio.us, targeted to (web) developers. - make containers more mainstream. The FB-container addon is wildly popular, surely there are other applications that could be baked in. All these should be optional services that can be turned on, never again we should see the corrupted practices that gave us Pocket.
- pseudalopex 6y ago
- justaguy88 6y agoIs there any way to directly donate to firefox (and not other mozilla related things)?
- openfuture 6y agoMaybe some of those fired engineers could fork it. I'd pay 5$ a month for a non-google organization that is not lead by Marissa and is developing an open browser.
- hutzlibu 6y agohttps://en.wikipedia.org/wiki/Category:Web_browsers_based_on_Firefox https://en.wikipedia.org/wiki/Category:Web_browsers_based_on...
- Dylan16807 6y agoThey were not asking for a completely random fork, thanks.
- hutzlibu 6y agoMy point was, that apparently there are already quite some projects forking ff, so if OP wants to support a mozilla free ff, he has already the chance to do so today.
- stjohnswarts 6y agono
- wussboy 6y agoIt boggles the mind, doesn’t it? I’d happily pay a month fee for a branded “deluxe” Firefox.
- storminabucket 6y agoAnd even if there were, you could be subsidizing Mozilla, because they can simply give Firefox less now that you're supporting it
- bambam24 6y agoThe question for firefox was never been is it fast. The question for firefox was always “why its using 10GB RAM?”
- anthk 6y agoFirefox was born as the light outsider from Mozilla once all non browsing functions were scrapped out.
- yjftsjthsd-h 6y agoI've literally seen people commenting that they don't use firefox because chrome seems faster. (...and also, how on earth did you get it to use that much memory? I'm sitting over 500 tabs, albeit mostly unloaded, and 6 extensions, on a system with only 6GB installed)
- Miraste 6y agoIf you have the ram firefox will eat it, I've seen it use well over 10 before. Chromiums do the same thing, though.
- Dahoon 6y agoBS. Currently browsing HN, Google groups, Gitlab x2. Extensions enabled: Bypass paywall, Decentraleyes, Youtube enhancer, Facebook containers, Flagfox, Google container, HTTPS everywhere, Location guard, Sponsorblock and Ublock Origin Only using a few hundred MB atm: https://imgur.com/i6DYG69 https://imgur.com/i6DYG69
- Miraste 6y agoYou're responding to something I didn't say. GP was talking about memory usage with 500 tabs, with which Firefox will absolutely eat some RAM. Right now I have 200 and it's using 6.3gb.
- lkbm 6y agoThat's nice. Here's 9GB resident[0] per htop. (Dev edition, four windows -- just under 50 tabs.) Interestingly, about:performance informs me that the highest single process is a Facebook tab taking 174MB[1], followed by Gmail at 166MB, and only shows total memory usage maybe 3GB. Activity Monitor output looks closer to htop, but shows, e.g., that pid 13691 (top one) as 2.52GB rather than 1.3GB. Web browsers are complicated, and when someone says "[browser] is using xxx memory on my computer", pointing out that it isn't on yours is in no way a refutation. At any rate, I've got a lot of memory, and Firefox uses a bunch of it. Sometimes this causes issues, but I also had similar issues in Chrome. (And with vscode. And with Docker. And, to a lesser extent, Slack.) I welcome perf gains on cpu, memory, and subjective responsiveness. All of these matter to me. [0] https://i.imgur.com/qYnkQuX.png https://i.imgur.com/qYnkQuX.png [1] Note: In the few minutes while I was writing this post, that FB tab rose to 215MB on about:performance, without me switching to it.
- vmchale 6y agoSounds like a challenge! Time to write JavaScript that's even more questionable.
- userbinator 6y agoThat's the first thing that I thought of too --- if browsers get faster, sites that are already full of terribly inefficient and unnecessary JS will just get worse to compensate. Somewhat like https://en.wikipedia.org/wiki/Wirth%27s_law https://en.wikipedia.org/wiki/Wirth%27s_law but at a different level of abstraction.
- wffurr 6y agoMore like Jevons Paradox.
- manquer 6y agoI see it differently. It allows even lesser skilled folks to build a site or app. If browsers performed like in 2010[1],we wouldnt have a lot of apps online. I am not talking about unicorn SaaS apps. I am talking about the local county or state government making things available online. The small business putting an app together beyond a basic website. It may not seem much to you but there is real and massive impact in developing economies. digitalization is single biggest tool against corruption. The education system in such places do not on average produce great comp sci engineers . the best graduates go to a big company. the rest have a job and build shitty but useful products. All this is not possible without browsers which can take the hit. [1] 2010-2020 time frame specifically because CPU has broadly stagnated in the last 10y however we have been able to build a lot more complex apps because of browser innovations
- account42 6y ago> It allows even lesser skilled folks to build a site It does not take more skill to build a site without JS, only more restraint > If browsers performed like in 2010[1],we wouldnt have a lot of apps online. I am not talking about unicorn SaaS apps. I am talking about the local county or state government making things available online. The small business putting an app together beyond a basic website. Less "apps" and more "basic" websites is exactly what should be encouraged.
- deleted 6y ago[deleted]
- antibland 6y agoIt's sad how these valuable optimizations are unknown to the average person. When I hear "the browser" discussed in almost any parlance, the implication is Chrome. It's rare to even hear someone say "Chrome," as it's the defacto choice for the non-mobile web. Convenience breeds ignorance.
- skybrian 6y agoA 10-15% speed bump in CPU performance is certainly nice but in most cases it's not going to be something that users are consciously aware of. Web page performance varies a lot due to network performance, new versions of websites being deployed, different ads being served, and so on. This noise obscures things enough that it probably won't be easy to attribute a change in performance to the browser if you're not looking for it. But even if the users aren't aware of what changed, it will likely affect user behavior. For the better? Hard to say. Websites that load a little faster are a little more addictive.
- Nextgrid 6y agoIf they want to actually improve user experience they can always include uBlock Origin by default - its permissive license should allow this just fine.
- avery42 6y agoI wonder if blocking Google Analytics by default would affect their default search engine deal with Google...
- boogies 6y agoTheir Tracking Protection doesn’t do that? I’d hope at least the Private Browsing protection does.
- ShinTakuya 6y agoThere's nothing stopping them from adjusting the defaults, but I guess users would criticise them for it.
- spitfire 6y agoGreat. Now it's time to start throttling JS in browsers. Give them the equivalent of a few MHZ or a few seconds runtime to play with and no more.
- deleted 6y ago[deleted]
- heartbeats 6y agoWhat's the point in making JS faster if websites are just going to pile on another layer of React.JS dogshit abstraction to compensate? What Bill giveth, Andy taketh away.
- mmwelt 6y agoIs it even possible to access about:config on Android? In the new Daylight Firefox, I just get an error page. There are a whole lot of other options I'd like to set...
- vorticalbox 6y agoYou used to be able to access it.
- 3r8riacz 6y agoYou need the beta version to access it, but there is an open issue on Github to reenable it in the stable version again.
- samcat116 6y agoWhy wouldn't you use Microsoft™ Edge(ium)™
- tartoran 6y agoI started using Firefox lately and like it but there are times when it really stalls and that hasn't happened in chrome in for like the past 10 years or so. Does anyone else have similar issues with FF? I want to stick to using FF but I expect/hope these issues get fixed.
- 23523525 6y agoDONATE NOW. Mitchell Baker needs another house.
- akmittal 6y agoThis is great improvement, But sadly it is too little and too late. Firefox is only non webkit engine that matters. With Firefox's 4% global share and declining no one knows how to save it. Maybe they can adopt V8 and keep Geeko to focus on lesser things.