This repository has been archived on 2025-10-15. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
minify-html/bench
Wilson Lin 220a9d02b8 0.6.8
2021-08-10 17:46:18 +10:00
..
inputs Generify bench 2021-08-08 21:01:37 +10:00
runners Implement c14n; minify doctypes; minify viewport tags 2021-08-10 02:56:48 +10:00
.gitignore Complete new bench 2021-08-08 23:11:05 +10:00
build Fix bench scripts 2021-08-09 23:19:37 +10:00
fetch.js Generify bench 2021-08-08 21:01:37 +10:00
graph.js Formatting 2021-08-09 19:56:37 +10:00
README.md 0.6.8 2021-08-10 17:46:18 +10:00
results.js Complete new bench 2021-08-08 23:11:05 +10:00
run Fix bench scripts 2021-08-09 23:19:37 +10:00

Benchmarking

This folder contains scripts used to test the performance and effectiveness of minify-html, for guided optimisation and/or comparisons.

It also contains a set of common web pages as inputs for benchmarking.

Comparison

Each minifier is run against each file in the inputs folder, which are HTML pages fetched from popular websites:

File name URL
Amazon https://www.amazon.com/
BBC https://www.bbc.co.uk/
Bootstrap https://getbootstrap.com/docs/3.4/css/
Bing https://www.bing.com/
Coding Horror https://blog.codinghorror.com/
ECMA-262 https://www.ecma-international.org/ecma-262/10.0/index.html
Google https://www.google.com/
Hacker News https://news.ycombinator.com/
NY Times https://www.nytimes.com/
Reddit https://www.reddit.com/
Stack Overflow https://www.stackoverflow.com/
Twitter https://twitter.com/
Wikipedia https://en.wikipedia.org/wiki/Soil

Note that these pages are already mostly minified.

For more information on how the inputs are fetched, see fetch.js.

On this project's README, average graphs are shown. Graphs showing per-input results are shown below:

Chart showing speed of HTML minifiers per inputChart showing effectiveness of HTML minifiers per input

Results depend on the input, so charts show performance relative to minify-html as a percentage.

Running

Run build to build the minifiers.

Run run to benchmark each HTML minifier against each input and output the results to the results folder.

Run graph.js to render graphs to the graphs folder.