Cython bindings for Turbo Base64
Project description
Turbo Base64
🚀 Lightning fast base64 encoding for Python
✨ Features
- 20-30x faster than the standard library
- Benchmarks faster than any other C base64 library
- Fastest implementation of AVX, AVX2, and AVX512 base64 encoding
- No other dependencies
⚡ How fast is it?
Graph generated from benchmark.py:
💻 Usage
>>> import turbob64
This will automatically detect the fastest algorithm your CPU is capable of and use it.
Encoding
>>> turbob64.b64encode(b'Hello World!')
b'SGVsbG8gV29ybGQh'
Decoding
>>> turbob64.b64decode(b'SGVsbG8gV29ybGQh')
b'Hello World!'
Other Functions
Directly call CPU-specific algorithms
Memory efficient (small lookup tables) scalar but slower version
turbob64.b64senc(b'Hello World!')
turbob64.b64sdec(b'SGVsbG8gV29ybGQh')
Fast scalar
turbob64.b64xenc(b'Hello World!')
turbo64.b64xdec(b'SGVsbG8gV29ybGQh')
ssse3 SIMD
turbob64.b64v128enc(b'Hello World!')
turbob64.b64v128dec(b'SGVsbG8gV29ybGQh')
avx SIMD
turbob64.b64v128aenc(b'Hello World!')
turbob64.b64v128adec(b'SGVsbG8gV29ybGQh')
avx2 SIMD
turbob64.b64v256enc(b'Hello World!')
turbob64.b64v256dec(b'SGVsbG8gV29ybGQh')
avx2 SIMD (optimized for short strings)
turbob64.b64v256enc_short(b'Hello World!')
turbob64.b64v256dec_short(b'SGVsbG8gV29ybGQh')
avx512_vbmi SIMD
turbob64.b64v512enc(b'Hello World!')
turbob64.b64v512dec(b'SGVsbG8gV29ybGQh')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file turbob64-1.1.1.tar.gz.
File metadata
- Download URL: turbob64-1.1.1.tar.gz
- Upload date:
- Size: 46.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
772be275821403c9854a9811143b18f3657e9e219a878879c45b2effd569f048
|
|
| MD5 |
8058cf597e7bd0177765e0cbfb479058
|
|
| BLAKE2b-256 |
cb717858095c8d9fe97b4cacd568e67abf1456540b1125c94804d59cd71a280a
|
File details
Details for the file turbob64-1.1.1-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: turbob64-1.1.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 66.3 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7a947f9b24e6c14976e240f05474f7e08dbb138b66d7fa6bb66afb958fdd706
|
|
| MD5 |
119db35a71607a62dcd9580c8f569bb3
|
|
| BLAKE2b-256 |
b8aa1a400013a6b89864e6dc485450fbeb198c9f4d8e2b15de88dec424d68e31
|
File details
Details for the file turbob64-1.1.1-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: turbob64-1.1.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 65.7 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d20b754eb02b66337c02e03a2b4bed88eac4b6004184250c4a2f8960b9bae3ce
|
|
| MD5 |
b6bd4de369871b333251f61f7e0598a7
|
|
| BLAKE2b-256 |
aa9b2ee9801dd973325d7e089a87e50be07e5455adc50980267e1f603bb737d0
|
File details
Details for the file turbob64-1.1.1-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: turbob64-1.1.1-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 65.7 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5b21c6cfd1e4ee10c0f95cab0f981713529fe0acda46dd784fada1ac3718210
|
|
| MD5 |
4b0fb32bb5d1bbcd9ea727717acc9d93
|
|
| BLAKE2b-256 |
95e3520c2a8af1139b0ddf92bffea0cf9a03e2187fe820d8ab5ca8268548ebc5
|
File details
Details for the file turbob64-1.1.1-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: turbob64-1.1.1-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 65.8 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6815253529d61b70d5ada18f883f49b7690f328ca1d56e0a1af9d675b4ab4164
|
|
| MD5 |
5a0ffc3470f51a967a95ce47304bcccc
|
|
| BLAKE2b-256 |
fb41ce131440c5ce3564d5b3801a33a2e351bd8fb261232d7721032488fe6b71
|
File details
Details for the file turbob64-1.1.1-cp37-cp37-win_amd64.whl.
File metadata
- Download URL: turbob64-1.1.1-cp37-cp37-win_amd64.whl
- Upload date:
- Size: 65.8 kB
- Tags: CPython 3.7, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
339624cd8ddff522701c26e7a4ccf44ac2be15428a1372b090a21041feb47267
|
|
| MD5 |
e7fd09b30e42d01c1652830f5812ada0
|
|
| BLAKE2b-256 |
a91477d80788a4f07c66e3b2f02983f55adf5c399577ebcbb0e7e3491c0a2c7a
|