v8 / web-tooling-benchmark

JavaScript benchmark for common web developer workloads

Home Page:https://v8.github.io/web-tooling-benchmark/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Web Tooling Benchmark

Build Status styled with prettier

This is a benchmark suite designed to measure the JavaScript-related workloads commonly used by web developers, such as the core workloads in popular tools like Babel or TypeScript. The goal is to measure only the JavaScript performance aspect (which is affected by the JavaScript engine) and not measure I/O or other unrelated aspects.

See the in-depth analysis for a detailed description of the tests included in this benchmark suite.

The latest browser version of the benchmark is available at https://v8.github.io/web-tooling-benchmark/.

Support

The Web Tooling Benchmark supports the latest active LTS version of Node.js. To see the supported Node.js versions of the current version of the benchmark, see the node_js section of our CI configuration.

Building

To build the benchmark suite, run

$ npm install

assuming that you have a working Node.js installation. Once the command is done, it produces a bundled version that is suitable to run in JS shells (i.e. d8, jsc or jsshell) in dist/cli.js and another bundle in dist/browser.js that is used by the browser version in dist/index.html.

To build an individual benchmark rather than the entire suite, pass the --env.only CLI flag:

$ npm run build -- --env.only babel

Running

You can either run the benchmark suite directly via Node, i.e. like this:

$ node dist/cli.js
Running Web Tooling Benchmark v0.5.2…
-------------------------------------
         acorn:  5.50 runs/s
         babel:  6.10 runs/s
  babel-minify:  9.13 runs/s
       babylon:  8.00 runs/s
         buble:  4.77 runs/s
          chai: 14.47 runs/s
  coffeescript:  5.62 runs/s
        espree:  4.05 runs/s
       esprima:  6.68 runs/s
        jshint:  7.84 runs/s
         lebab:  7.52 runs/s
       postcss:  5.06 runs/s
       prepack:  6.26 runs/s
      prettier:  5.97 runs/s
    source-map:  8.60 runs/s
        terser: 16.40 runs/s
    typescript: 10.04 runs/s
     uglify-js:  3.81 runs/s
-------------------------------------
Geometric mean:  6.98 runs/s

Or you open a web browser and point it to dist/index.html, or you can use one of the engine JS shells to run the special bundle in dist/cli.js. The easiest way to install recent versions of the supported JS engine shells is to run jsvu. Afterwards, you can run the benchmark as follows:

$ chakra dist/cli.js
$ javascriptcore dist/cli.js
$ spidermonkey dist/cli.js
$ v8 dist/cli.js

To run an individual benchmark rather than the entire suite via Node, pass the --only CLI flag:

$ npm run build -- --env.only babel && npm run benchmark

About

JavaScript benchmark for common web developer workloads

https://v8.github.io/web-tooling-benchmark/

License:Other


Languages

Language:JavaScript 97.4%Language:CSS 1.8%Language:HTML 0.8%