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