Skip to content

Commit

Permalink
Refactor benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 30, 2023
1 parent 3cf2c29 commit 142a16c
Show file tree
Hide file tree
Showing 5 changed files with 521 additions and 789 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"@types/mdast": "^4.0.0",
"@types/node": "^20.0.0",
"@types/parse-author": "^2.0.0",
"bail": "^2.0.0",
"bytes": "^3.0.0",
"c8": "^8.0.0",
"comment-parser": "^1.0.0",
Expand All @@ -81,6 +80,7 @@
"mdast-zone": "^6.0.0",
"micromark-extension-gfm": "^3.0.0",
"micromark-util-normalize-identifier": "^2.0.0",
"p-all": "^5.0.0",
"parse-author": "^2.0.0",
"prettier": "^3.0.0",
"property-information": "^6.0.0",
Expand All @@ -94,7 +94,6 @@
"strip-indent": "^4.0.0",
"to-vfile": "^8.0.0",
"trim-trailing-lines": "^2.0.0",
"trough": "^2.0.0",
"type-coverage": "^2.0.0",
"type-fest": "^4.0.0",
"typescript": "^5.0.0",
Expand Down
272 changes: 127 additions & 145 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ and `rehype-minify`.
To summarize: differences are negligible, in fact, minifying HTML doesn’t matter
much.
What does matter is using good compressions, such as gzip.
Note: `html-minifier` sometimes crashes, such as on `rocketchat`.
Note: `html-minifier` sometimes crashes, such as on amazon.
<!--benchmark start-->
Expand All @@ -156,203 +156,185 @@ Note: `html-minifier` sometimes crashes, such as on `rocketchat`.
<tbody>
<tr>
<th scope="row" align="left"><a href="https://www.amazon.co.uk/">amazon</a></th>
<td align="right">446.35KB</td>
<td align="right">7.74%</td>
<td align="right"><b>8.83%</b></td>
<td align="right">114.03KB</td>
<td align="right">6.38%</td>
<td align="right"><b>6.75%</b></td>
<td align="right">567.85KB</td>
<td align="right"><b>5.71%</b></td>
<td align="right">💥</td>
<td align="right">128.65KB</td>
<td align="right"><b>5.07%</b></td>
<td align="right">💥</td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://www.bbc.co.uk/">bbc</a></th>
<td align="right">293.18KB</td>
<td align="right"><b>3.65%</b></td>
<td align="right">3.45%</td>
<td align="right">36.3KB</td>
<td align="right"><b>1.72%</b></td>
<td align="right">1.71%</td>
<td align="right">531.54KB</td>
<td align="right"><b>4.70%</b></td>
<td align="right">4.58%</td>
<td align="right">58.09KB</td>
<td align="right">1.85%</td>
<td align="right"><b>1.96%</b></td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://getbootstrap.com/docs/4.4/getting-started/introduction/">bootstrap</a></th>
<td align="right">35.18KB</td>
<td align="right">21.66%</td>
<td align="right"><b>22.08%</b></td>
<td align="right">8.4KB</td>
<td align="right">4.85%</td>
<td align="right"><b>5.08%</b></td>
<td align="right">33.96KB</td>
<td align="right">22.36%</td>
<td align="right"><b>22.82%</b></td>
<td align="right">8.12KB</td>
<td align="right">5.17%</td>
<td align="right"><b>5.36%</b></td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://kangax.github.io/compat-table/es6/">compat table</a></th>
<td align="right">7.6MB</td>
<td align="right">16.67%</td>
<td align="right"><b>16.97%</b></td>
<td align="right">241.77KB</td>
<td align="right">3.69%</td>
<td align="right"><b>5.51%</b></td>
<th scope="row" align="left"><a href="https://kangax.github.io/compat-table/es6/">compat-table</a></th>
<td align="right">8.67MB</td>
<td align="right">16.34%</td>
<td align="right"><b>16.74%</b></td>
<td align="right">275.06KB</td>
<td align="right">8.26%</td>
<td align="right"><b>10.06%</b></td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://tc39.es/ecma262/">ecmascript</a></th>
<td align="right">6.58MB</td>
<td align="right">9.55%</td>
<td align="right"><b>10.09%</b></td>
<td align="right">790.72KB</td>
<td align="right">5.26%</td>
<td align="right"><b>5.43%</b></td>
<td align="right">6.62MB</td>
<td align="right">10.86%</td>
<td align="right"><b>11.56%</b></td>
<td align="right">789.66KB</td>
<td align="right">6.39%</td>
<td align="right"><b>6.60%</b></td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://eloquentjavascript.net/20_node.html">eloquent</a></th>
<td align="right">80.09KB</td>
<td align="right">80.08KB</td>
<td align="right">6.43%</td>
<td align="right"><b>6.45%</b></td>
<td align="right">19.13KB</td>
<td align="right">1.24%</td>
<td align="right">1.25%</td>
<td align="right"><b>1.26%</b></td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://github.com">github</a></th>
<td align="right">184.92KB</td>
<td align="right"><b>16.86%</b></td>
<td align="right">16.18%</td>
<td align="right">34.39KB</td>
<td align="right">7.00%</td>
<td align="right"><b>7.20%</b></td>
<td align="right">233.14KB</td>
<td align="right">13.39%</td>
<td align="right"><b>14.51%</b></td>
<td align="right">38.86KB</td>
<td align="right">7.48%</td>
<td align="right"><b>7.91%</b></td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://www.google.com/">google</a></th>
<td align="right">13.01KB</td>
<td align="right"><b>7.60%</b></td>
<td align="right">7.56%</td>
<td align="right">5.75KB</td>
<td align="right"><b>4.56%</b></td>
<td align="right">4.26%</td>
<th scope="row" align="left"><a href="https://www.google.com">google</a></th>
<td align="right">253.98KB</td>
<td align="right">3.13%</td>
<td align="right"><b>3.20%</b></td>
<td align="right">80.56KB</td>
<td align="right"><b>3.64%</b></td>
<td align="right">3.63%</td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://www.theguardian.com/us">guardian</a></th>
<td align="right">929.59KB</td>
<td align="right">3.76%</td>
<td align="right"><b>4.20%</b></td>
<td align="right">128.07KB</td>
<td align="right">2.78%</td>
<td align="right"><b>2.93%</b></td>
<th scope="row" align="left"><a href="https://www.theguardian.com">guardian</a></th>
<td align="right">765.54KB</td>
<td align="right">6.75%</td>
<td align="right"><b>8.71%</b></td>
<td align="right">112.21KB</td>
<td align="right">3.96%</td>
<td align="right"><b>4.38%</b></td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://html.spec.whatwg.org">html</a></th>
<td align="right">11.17MB</td>
<td align="right">3.28%</td>
<td align="right"><b>3.31%</b></td>
<td align="right">1.66MB</td>
<td align="right">5.41%</td>
<td align="right"><b>5.49%</b></td>
<td align="right">12.72MB</td>
<td align="right">3.15%</td>
<td align="right"><b>3.19%</b></td>
<td align="right">1.85MB</td>
<td align="right">5.49%</td>
<td align="right"><b>5.58%</b></td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://www.linkedin.com/">linkedin</a></th>
<td align="right">84.47KB</td>
<td align="right"><b>38.03%</b></td>
<td align="right">37.97%</td>
<td align="right">10.54KB</td>
<td align="right"><b>13.70%</b></td>
<td align="right">13.43%</td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://www.microsoft.com/en-us/">microsoft</a></th>
<td align="right">197.87KB</td>
<td align="right">8.82%</td>
<td align="right"><b>21.02%</b></td>
<td align="right">40.16KB</td>
<td align="right">4.44%</td>
<td align="right"><b>6.85%</b></td>
<td align="right">120.77KB</td>
<td align="right">32.29%</td>
<td align="right"><b>32.34%</b></td>
<td align="right">14.4KB</td>
<td align="right"><b>13.99%</b></td>
<td align="right">13.91%</td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://www.nbc.com/">nbc</a></th>
<td align="right">1.48MB</td>
<td align="right">5.65%</td>
<td align="right"><b>5.79%</b></td>
<td align="right">214.5KB</td>
<td align="right"><b>1.88%</b></td>
<td align="right">1.77%</td>
<th scope="row" align="left"><a href="https://www.microsoft.com">microsoft</a></th>
<td align="right">174.26KB</td>
<td align="right">22.44%</td>
<td align="right"><b>34.12%</b></td>
<td align="right">26.45KB</td>
<td align="right">12.96%</td>
<td align="right"><b>15.45%</b></td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://www.npmjs.com/">npm</a></th>
<td align="right">23.12KB</td>
<td align="right"><b>8.31%</b></td>
<td align="right">7.89%</td>
<td align="right">7.13KB</td>
<td align="right"><b>4.36%</b></td>
<td align="right">3.99%</td>
<th scope="row" align="left"><a href="https://www.nbc.com">nbc</a></th>
<td align="right">1.64MB</td>
<td align="right">5.94%</td>
<td align="right"><b>6.28%</b></td>
<td align="right">221.08KB</td>
<td align="right">1.86%</td>
<td align="right"><b>1.92%</b></td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://www.nytimes.com/">nytimes</a></th>
<td align="right">1.17MB</td>
<td align="right"><b>8.90%</b></td>
<td align="right">8.59%</td>
<td align="right">123.83KB</td>
<td align="right"><b>4.42%</b></td>
<td align="right">4.12%</td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://rocket.chat">rocketchat</a></th>
<td align="right">186.83KB</td>
<td align="right"><b>12.15%</b></td>
<td align="right">💥</td>
<td align="right">28.81KB</td>
<td align="right"><b>7.10%</b></td>
<td align="right">💥</td>
<th scope="row" align="left"><a href="https://www.npmjs.com">npm</a></th>
<td align="right">27.98KB</td>
<td align="right"><b>3.03%</b></td>
<td align="right">2.61%</td>
<td align="right">8.28KB</td>
<td align="right"><b>2.22%</b></td>
<td align="right">2.01%</td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://slack.com/intl/en-gb/features">slack</a></th>
<td align="right">119.24KB</td>
<td align="right"><b>4.81%</b></td>
<td align="right">3.94%</td>
<td align="right">35.76KB</td>
<td align="right"><b>1.95%</b></td>
<td align="right">1.55%</td>
<th scope="row" align="left"><a href="https://www.nytimes.com">nytimes</a></th>
<td align="right">822.38KB</td>
<td align="right">11.80%</td>
<td align="right"><b>11.80%</b></td>
<td align="right">137.47KB</td>
<td align="right">2.71%</td>
<td align="right"><b>2.72%</b></td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://stackoverflow.com/">stackoverflow</a></th>
<td align="right">117.91KB</td>
<td align="right">31.43%</td>
<td align="right"><b>33.03%</b></td>
<td align="right">22.1KB</td>
<td align="right">9.95%</td>
<td align="right"><b>10.84%</b></td>
<th scope="row" align="left"><a href="https://slack.com">slack</a></th>
<td align="right">205.45KB</td>
<td align="right"><b>4.76%</b></td>
<td align="right">4.55%</td>
<td align="right">49.63KB</td>
<td align="right"><b>2.06%</b></td>
<td align="right">1.98%</td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://twitter.com/">twitter</a></th>
<td align="right">42.86KB</td>
<td align="right"><b>9.40%</b></td>
<td align="right">9.11%</td>
<td align="right">13.33KB</td>
<td align="right"><b>3.70%</b></td>
<td align="right">3.45%</td>
<th scope="row" align="left"><a href="https://stackoverflow.com">stackoverflow</a></th>
<td align="right">169.8KB</td>
<td align="right">18.64%</td>
<td align="right"><b>19.10%</b></td>
<td align="right">45.4KB</td>
<td align="right">6.42%</td>
<td align="right"><b>6.67%</b></td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://www.vice.com/en_us">vice</a></th>
<td align="right">182.35KB</td>
<td align="right"><b>5.29%</b></td>
<td align="right">4.91%</td>
<td align="right">40.65KB</td>
<td align="right"><b>4.89%</b></td>
<td align="right">4.70%</td>
<th scope="row" align="left"><a href="https://www.vice.com">vice</a></th>
<td align="right">337.93KB</td>
<td align="right"><b>3.48%</b></td>
<td align="right">3.22%</td>
<td align="right">92.58KB</td>
<td align="right"><b>2.61%</b></td>
<td align="right">2.52%</td>
</tr>
<tr>
<th scope="row" align="left"><a href="https://en.wikipedia.org/wiki/President_of_the_United_States">wikipedia</a></th>
<td align="right">658.95KB</td>
<td align="right">6.06%</td>
<td align="right"><b>6.81%</b></td>
<td align="right">126.5KB</td>
<td align="right">1.89%</td>
<td align="right"><b>2.12%</b></td>
<td align="right">768.18KB</td>
<td align="right">6.08%</td>
<td align="right"><b>6.76%</b></td>
<td align="right">144KB</td>
<td align="right">1.58%</td>
<td align="right"><b>1.77%</b></td>
</tr>
</tbody>
<tfoot>
<tr>
<th scope="row">total</th>
<td align="right">31.52MB</td>
<td align="right">29.07MB</td>
<td align="right">29.02MB</td>
<td align="right">3.65MB</td>
<td align="right">3.48MB</td>
<td align="right">3.48MB</td>
<td align="right">34.63MB</td>
<td align="right">31.9MB</td>
<td align="right">31.83MB</td>
<td align="right">4.05MB</td>
<td align="right">3.85MB</td>
<td align="right">3.85MB</td>
</tr>
</tfoot>
</table>
Expand Down
Loading

0 comments on commit 142a16c

Please sign in to comment.