Chrome enables a new compiler

Reposted from: OSC Open Source Community (ID: oschina2013)

The Chrome browser has achieved a high score of 491 points in the latest Speedometer benchmark test, and in March 2022, Chrome has just reached 300 points; in June 2022 it will reach 360 points; in April 2023 it will be close to 400 points. In one year and two months, Chrome's Speedometer benchmark score increased by nearly 200 points from 300 to 491.

Benchmark (benchmark test) is an important indicator to measure the performance of the browser. Through the score, the user can intuitively feel the performance of the browser. Some of the most commonly used benchmarks in the industry today are Speededometer, MotionMark, and Jetstream.

Recently, the Chrome team shared their improvements in the Chrome browser and set new high scores in all three benchmarks mentioned above.

Brand new compiler: Maglev

The reason for this excellent result is that the Chrome team has brought a new compiler to the browser - Maglev, Maglev is a just-in-time compiler that quickly compiles all relevant functions within the first hundredth of a second. Generate high-performance machine code. It reduces the overall CPU time for compiling code, which also leads to better battery life. The Chrome team's measurements show that Maglev delivered a 7.5% performance boost on the Jetstream benchmark and a 5% performance boost on Speedometer. Maglev is currently available in Chrome 114 and will be gradually rolled out to users.

Speedometer

We mentioned at the beginning that Chrome has achieved a high score of 491 in the Speedometer benchmark test, and it took only one year and two months to improve from 300 to 491. Chrome's improvement from 100 points to 300 points spans Chrome 40 (released in November 2014) to Chrome 101 (released in April 2022), with an interval of 7 and a half years.

dc9bdee90bf41b664e6b58da345fd4cd.png

The graph above shows   the scores measured on an M2 Macbook Air using Chrome 116.0.5803.2 with the Maglev compiler enabled.

Jetstream

JetStream is a JavaScript and WebAssembly  benchmark suite focused on advanced web applications  . In optimizing the V8 engine, many of the updates the Chrome team made to Speedometer also drove improvements to Jetstream. Aside from these improvements, enabling the new Maglev compiler was the single most important factor in determining the Jetstream benchmark results.

8e49e1c9f110edeec3b05bb4bd3d2508.png

The above figure is also on the M2 Macbook Air, using Chrome 116.0.5803.2 with the Maglev compiler turned on.

MotionMark

MotionMark is designed to test the rendering capabilities of browser graphics systems at high frame rates. Since the beginning of the year, Chrome's graphics and rendering teams have tracked more than 20 optimizations, more than half of which are currently live in Chrome. Combined, these optimizations nearly double Chrome's performance. Some of the notable changes include improvements to Canvas performance, configuration file optimizations, GPU task scheduling, and layer compositing. The Chrome team also created new algorithms for Dynamic Multisample Anti-Aliasing and out-of-process 2D Canvas rasterization to improve parallelism.

bf764b58fa764dfa7113c7a1d837b924.png

The picture above is the test result obtained using Chrome 115.0.5773.4 on the M2 Macbook Pro. This result also marks a nearly 3-fold performance improvement of the Chrome browser based on last year.

At present, the Google and Chrome teams have not disclosed too many technical details of Maglev. There is only one sentence about how Maglev can bring better battery life, and no specific test data is given.

Related link: https://blog.chromium.org/2023/06/how-chrome-achieved-high-scores-on.html

Guess you like

Origin blog.csdn.net/m0_62996549/article/details/131361093