Firefox nightly builds noticeably improved JIT compilation performance

Π’ nightly builds Firefox included updated JIT compiler, developed codenamed WarpBuilder. There is a "javascript.options.warp" option in about:config to enable the new JIT.
It is noted that WarpBuilder is only the first step towards the inclusion of new optimizations in the browser, which are planned to be implemented over the next year.

The new JIT improves the performance of the SpiderMonkey JavaScript engine by reducing internal type information kept track of inside the engine and by using the Intermediate Code Caching (CacheIR) technique, previously proposed in the "baseline" bytecode interpreter, which occupies an intermediate niche between a regular interpreter and a pre-JIT compiler. These changes made it possible to significantly simplify the JIT architecture, improve responsiveness, reduce page load times, and reduce memory consumption.

It is notedthat the new JIT solved many of the problems of the old JIT IonBuilder, such as:

  • Complexity of implementation and potential security issues;
  • Additional overhead for Baseline/C++ code;
  • Unnecessary specialization leading to unnecessary recompilations;
  • Generation of intermediate code MIR (Middle-level IR) in the main thread (in WarpBuilder, the main assembly of the intermediate code is moved to a separate thread);
  • Additional memory consumption for storing data about types and groups of objects (ObjectGroups).

On average, in tests that evaluate performance based on visual metrics, using WarpBuilder sees a speedup of 5-15%. Speedometer test completion rate increased by 10%. Testing on real sites showed a reduction in Google Docs load time by 20%, indicator SpeedIndex when opening the Android section in Reddit improved by 13%, pdfpaint now runs faster on 18%. Memory consumption in the test tp6 decreased by 8%. Indicators stats in developer tools (devtools perf) also showed an 8% reduction in memory consumption.

Source: opennet.ru

Add a comment