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
|
.. copyright:
Copyright 2011 - 2021
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.
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.10.0
~~~~~~~~~~~~~
.. rst-class:: benchmark
+--------------+------------------------+------------------------+
| Name | bootstrap (142.5) | bootstrap.min (118.6) |
+==============+========================+========================+
| YUI Port | 1113.70 ms (118.8 \*) | 1000.29 ms (118.5 \*) |
+--------------+------------------------+------------------------+
| |rcssmin| | 32.29 ms (119.2 >) | 14.71 ms (118.6 >) |
+--------------+------------------------+------------------------+
| _\ |rcssmin| | 0.48 ms (119.2 >) | 0.34 ms (118.6 >) |
+--------------+------------------------+------------------------+
.. rst-class:: benchmark
+--------------+------------------------+------------------------+
| Name | wikipedia (81.0) | wikipedia.min (49.4) |
+==============+========================+========================+
| YUI Port | 67.18 ms (49.4 \*) | 52.86 ms (49.4 \*) |
+--------------+------------------------+------------------------+
| |rcssmin| | 14.57 ms (49.6 >) | 7.32 ms (49.4 =) |
+--------------+------------------------+------------------------+
| _\ |rcssmin| | 0.28 ms (49.6 >) | 0.18 ms (49.4 =) |
+--------------+------------------------+------------------------+
Python 2.7.18
~~~~~~~~~~~~~
.. rst-class:: benchmark
+--------------+------------------------+------------------------+
| Name | bootstrap (142.5) | bootstrap.min (118.6) |
+==============+========================+========================+
| YUI Port | 1078.57 ms (118.8 \*) | 970.64 ms (118.5 \*) |
+--------------+------------------------+------------------------+
| |rcssmin| | 29.73 ms (119.2 >) | 12.66 ms (118.6 >) |
+--------------+------------------------+------------------------+
| _\ |rcssmin| | 0.47 ms (119.2 >) | 0.33 ms (118.6 >) |
+--------------+------------------------+------------------------+
.. rst-class:: benchmark
+--------------+------------------------+------------------------+
| Name | wikipedia (81.0) | wikipedia.min (49.4) |
+==============+========================+========================+
| YUI Port | 62.44 ms (49.4 \*) | 50.57 ms (49.4 \*) |
+--------------+------------------------+------------------------+
| |rcssmin| | 12.87 ms (49.6 >) | 6.16 ms (49.4 =) |
+--------------+------------------------+------------------------+
| _\ |rcssmin| | 0.24 ms (49.6 >) | 0.15 ms (49.4 =) |
+--------------+------------------------+------------------------+
.. end tables
.. vim: ft=rest tw=72
|