The founder of QEMU and FFmpeg has released the JavaScript engine QuickJS.

French mathematician Fabrice Bellard, the founder of the QEMU and FFmpeg projects, who also created the fastest formula for calculating the number Pi and developed the image format BPG, has published the first release of a new JavaScript engine QuickJS. The engine is compact and designed for embedding in other systems. The project code is written in C and is distributed under the MIT license. A WebAssembly build of the engine, compiled with Emscripten and suitable for running in browsers, is also available.

JavaScript implementation the properties of the ES2019 specification, including modules, asynchronous generators, and proxies. Optionally, non-standard mathematical extension types for JavaScript, such as BigInt and BigFloat, as well as operator overloading. In terms of performance, QuickJS significantly outperforms existing alternatives; for example, in the bench-v8 test, it surpasses the
XS engine by 35%, DukTape more than twice, JerryScript by three times, and MuJS by seven times. In addition to the library for embedding the engine in applications, the project also offers the qjs interpreter, which can be used to run JavaScript code from the command line. Moreover, a compiler qjsc is available that can generate executable files suitable for standalone execution without external dependencies.

Compactness and ease of embedding in other projects. The code consists of only a few C files, requiring no external dependencies for compilation. The compiled simplest application occupies about 190 KB;

Main features:

  • Very high performance and low startup time. Passing 56,000 tests for compatibility with ECMAScript takes about 100 seconds when run on a single core of a regular desktop PC. Initialization of the runtime takes less than 300 microseconds;
  • Nearly complete support for the ES2019 specification and full support for application "B," which defines components for compatibility with older web applications;
  • Full passing of all tests from the ECMAScript Test Suite;
  • Support for compiling JavaScript code into executable files without external dependencies;
  • A garbage collector based on reference counting without cyclical cleanup execution, achieving predictable behavior and reduced memory consumption;
  • Reference counting garbage collector without cyclic cleanup, enabling predictable behavior and reduced memory consumption;
  • A set of extensions for mathematical computations in JavaScript;
  • A shell for running code in command line mode, supporting syntax highlighting;
  • A compact standard library with wrappers over C libraries.

The project also develops three accompanying C libraries, utilized in QuickJS and suitable for standalone use:

  • libregexp — a fast implementation of regular expressions, fully compatible with the JavaScript ES 2019 specification;
  • libunicode — a compact library for working with Unicode;
  • libbf — an implementation of arbitrary precision floating-point operations and transcendental functions with accurate rounding.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster