5 ms·
Stylo is about 10x faster than the old style system on a four core machine, and about 4x faster than Chrome's style system. This feature alone is worth 30% of i
by metajack 9y ago
Stylo is about 10x faster than the old style system on a four core machine, and about 4x faster than Chrome's style system. This feature alone is worth 30% of initial page load time on amazon and youtube.
So yes, Quantum is faster as a direct result both of Rust code, and of Rust's memory-safety-makes-parallelism-practical features. That is not the only source of performance improvement in Quantum though.
Also, Quantum isn't yet getting the full benefits possible from this code for a few reasons. Firefox 57 uses Stylo for content, but not yet for chrome, which will be coming in a later release. In Servo, CSS is parsed off the main thread, but in Quantum it is not yet (will be done in a future release). Servo pipelines style resolution and frame construction (basically after the top down pass to deal with the style cascade, we go back up the tree bottom up constructing the layout data structures), and Quantum does not yet do this. Lastly, cross-language inlining is missing which would allow inlining FFI calls. Servo doesn't have this issue since all the driver and layout code is also in Rust.