6 ms·
If I'm not wrong Firefox is already Rust. The language was even created inside Mozilla.
by fregonics 2y ago
If I'm not wrong Firefox is already Rust. The language was even created inside Mozilla.
- kobalsky 2y agoOnly around 11% of it is Rust according to https://4e6.github.io/firefox-lang-stats/ https://4e6.github.io/firefox-lang-stats/ , which by the way is no small feat given how huge the code base is.
- deleted 2y ago[deleted]
- alkonaut 2y agoIt is. They realized that writing a modern browser (i.e. one that for example uses multiple cores efficiently by doing layout/rendering/etc in parallel) is almost impossible in C++. To the point where creating a whole new language just to solve the problem would be a smaller undertaking. Which says something about the scope of this problem. And I really do think they are right.
- tombert 2y agoWhy is it almost impossible? I'm a little out of practice with C++ but I thought the modern C++ features were considered pretty solid in regards to memory safety and the like?
- nicebyte 2y agoc++ isn't memory safe and will probably never be. that being said, it's not more or less possible to create an efficient browser engine for multicore systems with c++ than any other language. programming language is not the thing that makes the task difficult.
- mikebenfield 2y agoC++ has indeed added many features that help with memory safety, at the cost of getting increasingly more complicated and harder to work with.
- mirsadm 2y agoEh that is a huge stretch. Besides Firefox is still significantly less performant than Chromium.
- drsnow 2y agoIn what ways? I'm curious as I have been under the impression it's no longer much of a difference in the way it used to be.
- thro1 2y agoPerformance is overrated and irrevelant. It's simple force - not a skill. I can't do in more performat Firefox, neither it doesn't matter how performant Chromium, things that was possible in Firefox with old extensions. Not having such abilities, the only thing left to Google to talk about was.. performace - and crippling powers of Firefox. Rust is a new skill, not more of force.
- ArtixFox 2y agoPerformance is overrated? What? I'm sorry but not all people are rich enough to own multiple threadrippers. Performance is a skill, probably one of the most important skills. Rust is a darn language, not a skill. You can have performant code in rust and in c++ and damnit even in brainfuck if you care enough. But the reality is that there is more performance oriented code written in C++ than in rust, and that matters.
- ozgrakkurt 2y agoYou can make a handmade car as well but it is difficult
- ArtixFox 2y agoHow does that matter??
- llama_drama 2y ago
- oldpersonintx 2y agoexcept they jettisoned the Servo project...
- ploxiln 2y ago> writing a modern browser (i.e. one that for example uses multiple cores efficiently by doing layout/rendering/etc in parallel) is almost impossible in C++ C++ also happens to be the only language in which that has been accomplished, so far. (The Rust components are relatively smaller, about 11% according to sibling comments.) See also: AAA video games
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]
- diath 2y ago> They realized that writing a modern browser (i.e. one that for example uses multiple cores efficiently by doing layout/rendering/etc in parallel) is almost impossible in C++ And yet Chrome does it just fine, and Ladybird can render some websites properly that Servo cannot, curious.
- fabrice_d 2y agoNo, Chrome doesn't eg. do style computation with a parallel algorithm like Firefox does since it adpoted Servo's style resolution engine. See how faster it is: https://nolanlawson.github.io/css-talk-2022/#70 https://nolanlawson.github.io/css-talk-2022/#70 Servo's rendering issues are a different class of bugs unrelated to performance: they are still working on the layout parts.