Hacker News new | ask | show | jobs
by graue 4623 days ago
Rust is about long-term strategy. They need it to build Servo, and they need Servo so they have a state-of-the-art browser engine in 5 years.

An unbelievable amount of effort has gone into optimizing Gecko, with impressive results, but ultimately it's an aging, legacy codebase. More importantly, neither Gecko nor WebKit/Blink are ready for a manycore world. As Brendan Eich puts it[1]:

The multicore/GPU future is not going to favor either WebKit or Gecko especially. The various companies investing in these engines, including us but of course Apple, Google, and others, will need to multi-thread as well as process-isolate their engines to scale better on “sea of processors” future hardware.

There’s more to it than threads: due to Amdahl’s Law both threads and so-called “Data Parallelism”, aka SIMD, are needed at fine grain in all the stages of the engine, not just in image and audio/video decoding. But threads in C++ mean more hard bugs and security exploits than otherwise.

I learned at SGI, which dived into the deep end of the memory-unsafe SMP kernel pool in the late ’80s, to never say never. Apple and Google can and probably will multi-thread and even SIMD-parallelize more of their code, but it will take them a while, and there will be productivity and safety hits. Servo looks like a good bet to me technically because it is safer by design, as the main implementation language, Rust, focuses on safety as well as concurrency.

1. https://brendaneich.com/2013/02/why-mozilla-matters/