File: benchmark.txt

package info (click to toggle)
python-rcssmin 1%3A1.1.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,196 kB
  • sloc: python: 2,379; ansic: 1,216; sh: 110; makefile: 20
file content (149 lines) | stat: -rw-r--r-- 5,906 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
.. copyright:
    Copyright 2011 - 2023
    André Malo or his licensors, as applicable

.. license:
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

:orphan:


=====================
 rCSSmin - Benchmark
=====================

.. contents::
    :local:


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 :file:`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 [#]_\.  The sign
behind the size value denotes the size difference in relation to the
YUI port (i.e. cssmin).

.. [#] Bytes / 1024 for Python 2 and Code Points / 1024 for Python 3


.. begin tables

Python 3.11.0
~~~~~~~~~~~~~

.. rst-class:: benchmark

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

.. rst-class:: benchmark

+--------------+------------------------+---------------------------+
| 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
~~~~~~~~~~~~~

.. rst-class:: benchmark

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

.. rst-class:: benchmark

+--------------+------------------------+---------------------------+
| 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
~~~~~~~~~~~~~

.. rst-class:: benchmark

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

.. rst-class:: benchmark

+--------------+------------------------+---------------------------+
| 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 =)  |
+--------------+------------------------+---------------------------+

.. end tables


.. vim: ft=rest tw=72