Skip to content

Commit

Permalink
Bump version to 0.3.0
Browse files Browse the repository at this point in the history
Update documentation accordingly
  • Loading branch information
mayeut committed Apr 2, 2018
1 parent 884f5b5 commit 08f8411
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 64 deletions.
87 changes: 67 additions & 20 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ To get the fastest decoding, it is recommended to use the ``pybase64.b64decode``
print(pybase64.urlsafe_b64decode(b'Pj4-Zm9vPz8_'))
# b'>>>foo???'
.. begin cli
A command-line tool is also provided. It has encode, decode and benchmark subcommands.

.. code::
.. code-block:: none
usage: pybase64 [-h] [-V] {benchmark,encode,decode} ...
Expand All @@ -78,33 +79,79 @@ A command-line tool is also provided. It has encode, decode and benchmark subcom
-h, --help show this help message and exit
-V, --version show program's version number and exit
.. end cli
Full documentation on `Read the Docs <http://pybase64.readthedocs.io/en/stable/?badge=stable>`_.

Benchmark
=========

Running Python 3.6.0, Apple LLVM version 8.1.0 (clang-802.0.42), Mac OS X 10.12.6 on an Intel Core i7-4870HQ @ 2.50GHz
.. begin benchmark
.. code::
Running Python 3.6.0, Apple LLVM version 9.1.0 (clang-902.0.39.1), Mac OS X 10.13.3 on an Intel Core i7-4870HQ @ 2.50GHz

.. code-block:: none
pybase64 0.2.0 (C extension active - AVX2)
pybase64 0.3.0 (C extension active - AVX2)
bench: altchars=None, validate=False
pybase64._pybase64.b64encode: 2941.397 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode: 328.250 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.b64encode: 565.744 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode: 327.075 MB/s (17,695,296 bytes -> 13,271,472 bytes)
pybase64._pybase64.encodebytes: 1671.633 MB/s (13,271,472 bytes -> 17,928,129 bytes)
pybase64._pybase64.b64encode: 3355.630 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode: 313.357 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.encodebytes: 84.229 MB/s (13,271,472 bytes -> 17,928,129 bytes)
base64.b64encode: 594.513 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode: 316.510 MB/s (17,695,296 bytes -> 13,271,472 bytes)
bench: altchars=None, validate=True
pybase64._pybase64.b64encode: 2995.909 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode: 3996.267 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.b64encode: 577.565 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode: 104.835 MB/s (17,695,296 bytes -> 13,271,472 bytes)
pybase64._pybase64.b64encode: 3447.100 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode: 3513.827 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.b64encode: 592.162 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode: 103.155 MB/s (17,695,296 bytes -> 13,271,472 bytes)
bench: altchars=b'-_', validate=False
pybase64._pybase64.b64encode: 2237.740 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode: 262.021 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.b64encode: 313.977 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode: 219.487 MB/s (17,695,296 bytes -> 13,271,472 bytes)
pybase64._pybase64.b64encode: 2440.743 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode: 285.376 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.b64encode: 344.905 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode: 224.162 MB/s (17,695,296 bytes -> 13,271,472 bytes)
bench: altchars=b'-_', validate=True
pybase64._pybase64.b64encode: 2349.481 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode: 2790.047 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.b64encode: 314.182 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode: 89.855 MB/s (17,695,296 bytes -> 13,271,472 bytes)
pybase64._pybase64.b64encode: 2566.995 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode: 2522.613 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.b64encode: 342.011 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode: 89.865 MB/s (17,695,296 bytes -> 13,271,472 bytes)
.. end benchmark
.. begin changelog
Changelog
=========
0.3.0
-----
- Add encodebytes function

0.2.1
-----
- Fixed invalid results on Windows

0.2.0
-----
- Added documentation
- Added subcommands to the main script:

* help
* version
* encode
* decode
* benchmark

0.1.2
-----
- Updated base64 native library

0.1.1
-----
- Fixed deployment issues

0.1.0
-----
- First public release

.. end changelog
3 changes: 3 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.. include:: ../README.rst
:start-after: .. begin changelog
:end-before: .. end changelog
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ Fast Base64 implementation for Python.

intro
api
changelog
license
pybase64 on Github <https://github.com/mayeut/pybase64>
49 changes: 6 additions & 43 deletions docs/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,50 +43,13 @@ To get the fastest decoding, it is recommended to use the :func:`~pybase64.b64de
Check :doc:`api` for more details.

A command-line tool is also provided. It has encode, decode and benchmark subcommands.

.. code-block:: none
usage: pybase64 [-h] [-V] {benchmark,encode,decode} ...
pybase64 command-line tool.
positional arguments:
{benchmark,encode,decode}
tool help
benchmark -h for usage
encode -h for usage
decode -h for usage
optional arguments:
-h, --help show this help message and exit
-V, --version show program's version number and exit
.. include:: ../README.rst
:start-after: .. begin cli
:end-before: .. end cli

Benchmark
---------
.. include:: ../README.rst
:start-after: .. begin benchmark
:end-before: .. end benchmark

Running Python 3.6.0, Apple LLVM version 8.1.0 (clang-802.0.42), Mac OS X 10.12.6 on an Intel Core i7-4870HQ @ 2.50GHz

.. code-block:: none
pybase64 0.2.0 (C extension active - AVX2)
bench: altchars=None, validate=False
pybase64._pybase64.b64encode: 2941.397 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode: 328.250 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.b64encode: 565.744 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode: 327.075 MB/s (17,695,296 bytes -> 13,271,472 bytes)
bench: altchars=None, validate=True
pybase64._pybase64.b64encode: 2995.909 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode: 3996.267 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.b64encode: 577.565 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode: 104.835 MB/s (17,695,296 bytes -> 13,271,472 bytes)
bench: altchars=b'-_', validate=False
pybase64._pybase64.b64encode: 2237.740 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode: 262.021 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.b64encode: 313.977 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode: 219.487 MB/s (17,695,296 bytes -> 13,271,472 bytes)
bench: altchars=b'-_', validate=True
pybase64._pybase64.b64encode: 2349.481 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode: 2790.047 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.b64encode: 314.182 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode: 89.855 MB/s (17,695,296 bytes -> 13,271,472 bytes)
2 changes: 1 addition & 1 deletion pybase64/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.2.1'
__version__ = '0.3.0'

0 comments on commit 08f8411

Please sign in to comment.