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).

Python 3.13.0

Name

bootstrap.css (142.5)

bootstrap.min.css (118.6)

YUI Port

972.78 ms (118.8 *)

877.85 ms (118.5 *)

rCSSmin

33.39 ms (119.2 >)

15.53 ms (118.6 >)

_rCSSmin

0.42 ms (119.2 >)

0.28 ms (118.6 >)

Name

wikipedia.css (81.0)

wikipedia.min.css (49.4)

YUI Port

56.57 ms (49.4 *)

45.41 ms (49.4 *)

rCSSmin

14.92 ms (49.6 >)

7.71 ms (49.4 =)

_rCSSmin

0.28 ms (49.6 >)

0.16 ms (49.4 =)

Python 3.12.7

Name

bootstrap.css (142.5)

bootstrap.min.css (118.6)

YUI Port

975.49 ms (118.8 *)

880.34 ms (118.5 *)

rCSSmin

32.26 ms (119.2 >)

15.32 ms (118.6 >)

_rCSSmin

0.44 ms (119.2 >)

0.26 ms (118.6 >)

Name

wikipedia.css (81.0)

wikipedia.min.css (49.4)

YUI Port

57.28 ms (49.4 *)

46.03 ms (49.4 *)

rCSSmin

14.83 ms (49.6 >)

7.59 ms (49.4 =)

_rCSSmin

0.28 ms (49.6 >)

0.16 ms (49.4 =)

Python 3.11.10

Name

bootstrap.css (142.5)

bootstrap.min.css (118.6)

YUI Port

950.83 ms (118.8 *)

855.49 ms (118.5 *)

rCSSmin

27.49 ms (119.2 >)

12.84 ms (118.6 >)

_rCSSmin

0.48 ms (119.2 >)

0.32 ms (118.6 >)

Name

wikipedia.css (81.0)

wikipedia.min.css (49.4)

YUI Port

57.83 ms (49.4 *)

44.60 ms (49.4 *)

rCSSmin

12.39 ms (49.6 >)

6.37 ms (49.4 =)

_rCSSmin

0.28 ms (49.6 >)

0.18 ms (49.4 =)

Python 3.10.15

Name

bootstrap.css (142.5)

bootstrap.min.css (118.6)

YUI Port

1059.07 ms (118.8 *)

944.84 ms (118.5 *)

rCSSmin

32.21 ms (119.2 >)

15.38 ms (118.6 >)

_rCSSmin

0.48 ms (119.2 >)

0.32 ms (118.6 >)

Name

wikipedia.css (81.0)

wikipedia.min.css (49.4)

YUI Port

63.39 ms (49.4 *)

49.47 ms (49.4 *)

rCSSmin

14.53 ms (49.6 >)

7.58 ms (49.4 =)

_rCSSmin

0.28 ms (49.6 >)

0.18 ms (49.4 =)

Python 2.7.18

Name

bootstrap.css (142.5)

bootstrap.min.css (118.6)

YUI Port

1099.95 ms (118.8 *)

990.41 ms (118.5 *)

rCSSmin

29.96 ms (119.2 >)

13.01 ms (118.6 >)

_rCSSmin

0.40 ms (119.2 >)

0.27 ms (118.6 >)

Name

wikipedia.css (81.0)

wikipedia.min.css (49.4)

YUI Port

63.70 ms (49.4 *)

51.75 ms (49.4 *)

rCSSmin

12.98 ms (49.6 >)

6.31 ms (49.4 =)

_rCSSmin

0.21 ms (49.6 >)

0.13 ms (49.4 =)