Firefox 58 promises to be even faster than Quantum
Firefox Quantum came to our teams promising more lightness and faster. And, in effect, it was the fastest version of the foxfire browser. Not so much about browsers as Opera and Edge, as we saw, but it beat Chrome in the vaunted speed and performance. Now, three months after its release, from Mozilla we are promised that Firefox 58 will be even faster. A lot more.
WebAssembly, often abbreviated as wasm, is a new type of binary code that has been running on modern web browsers for some time. Mozilla defines it as a low-level binary language with almost native performance. Thanks to him it is already possible to execute code faster and, in the future, accelerations will continue. One of them will incorporate Firefox 58: the ability to compile WebAssembly code faster than the network is able to deliver the packets. It is the promise.
So they compile faster than the network delivers the packages
Firefox 58, which will come with other interesting features under your arm, such as the function borrowed from Tor , will compile in real time, compiling the code while it is still downloading.
“This was only a possible future acceleration,” says engineer Lin Clark, who now “becomes reality.”
The new version of the Mozilla browser will also incorporate a new two-level compiler, a new baseline compiler that compiles code between 10 and 15 times faster than the optimizer compiler.
The combination of these two changes, says the head of the ad, “mean that we compile code faster than what comes from the network.” According to his calculations, 30 to 60 megabytes of WebAssembly code per second will be compiled on the desktop . In mobile, “even in a fairly average device,” they say they can compile at 8 megabytes per second, which is a higher speed than the average download speed for virtually any mobile network.
This means, they say, that the code runs almost as soon as the download ends. A significant breakthrough
If you start compiling the code before, you’ll finish compiling it before. That’s what the ‘streaming’ compilation does … it allows you to start compiling the wasm file as soon as possible.
When you download a file, it does not come down in one piece. Instead, it comes in a series of packages. Before, as each packet in the wasm file was being downloaded, the browser’s network layer put it in an ArrayBuffer. Then, once this is done, I would move that ArrayBuffer to the Web VM (also known as the JS engine). That’s when the WebAssembly compiler would start compiling.
But there is no good reason to make the compiler wait. It is technically possible to compile WebAssembly line by line. This means that you must be able to start as soon as the first fragment arrives. That’s what our new compiler does. Take advantage of the ‘streaming’ API of WebAssembly.
If we use Firefox Nightly or Beta , it is possible to test in our own devices the virtues with which Firefox 58 will arrive. We only have to click here and see the results to draw our own conclusions.