minify-html/bench
Wilson Lin e5307d4c9f 0.11.1 2023-05-07 19:34:04 +07:00
..
inputs Generify bench 2021-08-08 21:01:37 +10:00
runners Add optimisation flags to Rust libraries 2022-06-22 14:24:26 +10:00
.gitignore Complete new bench 2021-08-08 23:11:05 +10:00
README.md 0.11.1 2023-05-07 19:34:04 +07: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
results.js Complete new bench 2021-08-08 23:11:05 +10:00
run Remove core variant 2022-06-21 21:52:28 +10:00

README.md

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.