Earlier quoted context omitted.
Thanks for pointing that out. LLVM is one of the main things Apple gets to claim credit for, yet they aren't the only ones who deserve it. LLVM is one of the reasons rust is so great, and the world is better because of it.
You can still give Apple credit for having sponsored a significant investment into LLVM. Without them, it might not have taken off the way it has.
How Stylo Brought Rust and Servo to Firefox
111–120 of 199 posts
Re: How Stylo Brought Rust and Servo to Firefox
#112I love Firefox Quantum and it has replaced Chrome as my browser at home. It's memory consumption is far lower with the same amount of tabs open. That said, why does it perform slower than Chrome on most benchmarks? Is it due to the Chrome team doing much more grunt work regarding parallelism and asynchronous I/O? Or are there still features in the current Firefox build that still call the original engine? Does Rust h…
> most benchmarks Which benchmarks are you talking about? It depends on what those benchmarks measure. For example, a lot of the Quantum work was in user-percieved UI latency; unless the benchmark is measuring that, and I imagine that's a hard thing to measure, it's not going to show up. > Does Rust have a runtime penalty as Golang does? Rust has the same amount of runtime as C does: very very little. https://github.…
sys::stack_overflow::init();
I probably don't know what this function does, because my initial guess is not very comforting. :)Re: How Stylo Brought Rust and Servo to Firefox
#113Earlier quoted context omitted.
Feel free to file a bug report with your hardware, Firefox version, and test case, yes. These often boil down to simple bugs (hardware-specific or page-specific) that can be quickly fixed when isolated. The medium-term effort to revamp the graphics stack is WebRender. Note that, like Stylo, WebRender is not just meant to achieve parity with other browsers. It's a different architecture entirely that is more similar t…
Kind of OT, but I've noticed both latency and battery-life hits for compositing WMs in X (compared to traditional WMs). Are those things being measured at all in FF? It may be that the tradeoff is worth it (and I have no doubt it can be done better than the median compositing WM on linux), but it would be good to have that data. On the other hand, it may be moot if Wayland does end up taking over from X.
That's interesting. I remember the developer of KWin (KDE's window manager) saying that he considered disabling GPU compositing when the battery runs low, but he couldn't prove that this actually saves energy. In fact, on some configurations, GPU compositing was less power-intensive than CPU compositing.
Re: How Stylo Brought Rust and Servo to Firefox
#114Earlier quoted context omitted.
> most benchmarks Which benchmarks are you talking about? It depends on what those benchmarks measure. For example, a lot of the Quantum work was in user-percieved UI latency; unless the benchmark is measuring that, and I imagine that's a hard thing to measure, it's not going to show up. > Does Rust have a runtime penalty as Golang does? Rust has the same amount of runtime as C does: very very little. https://github.…
Looking at rt.rs: sys::stack_overflow::init(); I probably don't know what this function does, because my initial guess is not very comforting. :)
Re: How Stylo Brought Rust and Servo to Firefox
#115Earlier quoted context omitted.
> most benchmarks Which benchmarks are you talking about? It depends on what those benchmarks measure. For example, a lot of the Quantum work was in user-percieved UI latency; unless the benchmark is measuring that, and I imagine that's a hard thing to measure, it's not going to show up. > Does Rust have a runtime penalty as Golang does? Rust has the same amount of runtime as C does: very very little. https://github.…
Looking at rt.rs: sys::stack_overflow::init(); I probably don't know what this function does, because my initial guess is not very comforting. :)
https://github.com/rust-lang/rust/blob/71340ca4e181b824bcefa...
Re: How Stylo Brought Rust and Servo to Firefox
#116It might sound very naive to say this, but I found it very cool that it was someone from the States, an Aussie and a Spaniard working on this, open source is something magical when you think about it. Props to everyone involved, all those projects sound like a lot of fun for a good cause.
For servo we've had long periods of time where no two employees are in the same office (it helps that most folks are remote).
In both teams we found it impossible to pick meeting times that work for everyone so we instead scheduled two sessions for the recurring meetings, and you can show up for one of them (the team lead / etc are usually at both so they're scheduled such that it is possible for them to attend both). Though for Servo we eventually stopped the meeting since we're pretty good at async communication through all the other channels and the meeting wasn't very useful anymore.
Also, to clarify, while that was the initial team, shortly after getting Wikipedia working the team grew with folks from the Servo and Gecko teams. Eventually we had folks living in the US, Paris, Spain, Australia, Japan, Taiwan, and Turkey working on it. As well as volunteer contributors from all over the place.
Re: How Stylo Brought Rust and Servo to Firefox
#117One thing I've been wondering is that Stylo and Webrender can parallelize CSS and Paint, respectively, but I haven't seen any mention in Project Quantum (the project to integrate Servo components into Firefox/Gecko) of any component to parallelize layout, which is probably the biggest bottleneck on the web at the moment. Is parallel layout something which can only be done through a full rewrite, hence with Servo, and…
The OP links a video from 2015 that implies that one of the advantages of making Stylo the first Servo component in Gecko is that the next phase in the pipeline, layout, will be able to benefit from having a well-defined interface in place. I'm curious about this as well!
That said, we are absolutely going to explore opportunities for more Rust/Servo in layout, so we just need to find the right strategy. One incremental step I'm interested in exploring is to rewrite Gecko's frame constructor in Rust using the servo model, but have it continue to generate frames in the Gecko C++ format. This would give us rayon-driven parallelism in frame construction (which is a big performance bottleneck), while being a lot more tractable than swapping out all of layout at once. Another thing to explore would be borrowing Servo's tech for certain subtypes of layout (i.e. block reflow) and shipping it incrementally.
Each of these may or may not share code with Servo proper, depending on the tradeoffs. But Servo has a lot of neat innovation in that part of the pipeline (like bottom-up frame construction and parallel reflow) that I'm very interested in integrating into Firefox somehow.
We're going to meet in Austin in a few weeks and discuss this. Stay tuned!
Re: How Stylo Brought Rust and Servo to Firefox
#118> For example, register allocation is a tedious process that bedeviled assembly programmers, whereas higher-level languages like C++ handle it automatically and get it right every single time. Ideal register allocation is NP-complete, so a compiler can't get it right every single time. I'm not sure how good in practice modern compilers are at this, but would be curious to know if there's some asm writers who can actu…
Optimal register allocation has been polynomial time for more than 10 years - for some definition of optimal. IIRC it started with programs in SSA form and has dropped that requirement more recently. Modern GCC uses SSA form and I think LLVM might too.
No, it's only SSA form that has optimal register allocation in polynomial time, otherwise someone would've proved that P=NP (as its proven to NP-Hard). :)
That said, finding minimal SSA from arbitrary SSA is NP-Hard.
> Modern GCC uses SSA form and I think LLVM might too.
LLVM has always used SSA (this is relatively unsurprising given its origins in research and so much research of the period being on SSA).
Re: How Stylo Brought Rust and Servo to Firefox
#119Earlier quoted context omitted.
> most benchmarks Which benchmarks are you talking about? It depends on what those benchmarks measure. For example, a lot of the Quantum work was in user-percieved UI latency; unless the benchmark is measuring that, and I imagine that's a hard thing to measure, it's not going to show up. > Does Rust have a runtime penalty as Golang does? Rust has the same amount of runtime as C does: very very little. https://github.…
Looking at rt.rs: sys::stack_overflow::init(); I probably don't know what this function does, because my initial guess is not very comforting. :)
Re: How Stylo Brought Rust and Servo to Firefox
#120It's gratifying to see how successfully the same organization has learned from the debacle that was the rewrite from Netscape 4 to Mozilla in the first place. That time, they didn't release for years, losing market share and ceding the web to Internet Explorer for the next decade. Joel Spolsky wrote multiple articles[1][2] pointing out their folly. This time, their "multiple-moonshot effort" is paying off big-time be…