Metadata-Version: 2.1
Name: plinn
Version: 0.0.2
Summary: Partition Like It's 1999
Home-page: https://github.com/giannitedesco/plinn
Author: Gianni Tedesco
Author-email: gianni@scaramanga.co.uk
License: Apache 2.0
Description: # plinn: Partition Like It's 1999
        
        <div align="center">
          <img src="https://img.shields.io/pypi/v/plinn?label=pypi" alt="PyPI version">
        </div>
        
        ## The partition function
        
        This module implements a function called "partition."
        
        It is an optimized version of the following python function:
        
        ```python
        def partition(pred, it):
            f = []
            t = []
            for item in it:
                (t if pred(item) else f).append(item)
            return f, t
        ```
        
        ## Benchmarks
        Here are some benchmarks on my i7-6600U laptop with python 3.9.0 comparing
        against several pure-python variants of the same function:
        
        | Variant  | Time for 32 iterations (seconds) |
        |----------|------------------------|
        |stdlib    | 3.2970685160253197     |
        |mariy     | 3.5445828151423484     |
        |trevor    | 2.6459597239736468     |
        |byers     | 2.3595181389246136     |
        |scara     | 2.2327406019903720     |
        |scara2    | 2.1951448819600046     |
        |plinn     | 1.5203454510774463     |
        
Platform: Linux
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: POSIX :: Linux
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Description-Content-Type: text/markdown
