rCSSmin - Benchmark

The following numbers have been measured with the bench package provided in the source distribution. Since the numbers don’t vary much between python minor releases (e.g. 3.3 vs 3.4), only one benchmark per major version is given below. The docs/BENCHMARKS file in the source distribution contains a more comprehensive list. Said that - there is a considerable speed up of the python-only ports to be observed with Python 3.11. Thatswhy the benchmark will list all Python 3 versions up to 3.10.

Here’s the list of benchmarked implementations:

YUI Port

YUI port by Zachary Voase

rCSSmin

this very project

_rCSSmin

The C reimplementation of rCSSmin

And here’s a list of the benchmarked CSS files:

  • wikipedia.css / wikipedia.min.css

  • bootstrap.css / bootstrap.min.css (3.4.1)

Inside the parentheses are size information in KiB 1. The sign behind the size value denotes the size difference in relation to the YUI port (i.e. cssmin).

1

Bytes / 1024 for Python 2 and Code Points / 1024 for Python 3

Python 3.11.0

Name

bootstrap.css (142.5)

bootstrap.min.css (118.6)

YUI Port

909.71 ms (118.8 *)

819.69 ms (118.5 *)

rCSSmin

26.85 ms (119.2 >)

12.40 ms (118.6 >)

_rCSSmin

0.45 ms (119.2 >)

0.32 ms (118.6 >)

Name

wikipedia.css (81.0)

wikipedia.min.css (49.4)

YUI Port

55.24 ms (49.4 *)

42.82 ms (49.4 *)

rCSSmin

12.19 ms (49.6 >)

6.36 ms (49.4 =)

_rCSSmin

0.29 ms (49.6 >)

0.19 ms (49.4 =)

Python 3.10.5

Name

bootstrap.css (142.5)

bootstrap.min.css (118.6)

YUI Port

1065.29 ms (118.8 *)

951.60 ms (118.5 *)

rCSSmin

30.96 ms (119.2 >)

14.22 ms (118.6 >)

_rCSSmin

0.45 ms (119.2 >)

0.32 ms (118.6 >)

Name

wikipedia.css (81.0)

wikipedia.min.css (49.4)

YUI Port

64.12 ms (49.4 *)

51.02 ms (49.4 *)

rCSSmin

14.06 ms (49.6 >)

7.30 ms (49.4 =)

_rCSSmin

0.27 ms (49.6 >)

0.18 ms (49.4 =)

Python 2.7.18

Name

bootstrap.css (142.5)

bootstrap.min.css (118.6)

YUI Port

1036.28 ms (118.8 *)

948.90 ms (118.5 *)

rCSSmin

29.83 ms (119.2 >)

12.14 ms (118.6 >)

_rCSSmin

0.44 ms (119.2 >)

0.32 ms (118.6 >)

Name

wikipedia.css (81.0)

wikipedia.min.css (49.4)

YUI Port

62.93 ms (49.4 *)

49.33 ms (49.4 *)

rCSSmin

13.44 ms (49.6 >)

6.69 ms (49.4 =)

_rCSSmin

0.24 ms (49.6 >)

0.15 ms (49.4 =)