A drop-in replacement for the popular tqdm library, accelerated with C bindings
Project description
cqdm
A drop-in replacement for the popular tqdm library, accelerated with C bindings.
Usage
Install with pip install cqdm.
Replace usages of tqdm.tqdm with cqdm.cqdm. This can be done
succinctly by changing your import statement:
# was: from tqdm import tqdm
from cqdm import cqdm as tqdm
Performance
This library has about 1/5 the overhead of standard tqdm:
This graph was generated by running performance.py.
Impact
There are over 40 million monthly downloads of tqdm. Let's
assume there are 40 million instances of tqdm running every
day, each performing 100,000 iterations. This totals 92,000
seconds or 9.58 days of overhead, per day. Using a reasonable
price for CPU time on AWS, this equates to around $10
of compute, per day globally.
Switching to cqdm would reduce this overhead by 4/5.
That means, if everyone switched to using cqdm,
we could save $8 in CPU time per day, globally.
Of course, this ignores the increased time for installs, compilation, etc., which is nearly an order of magnitude greater than the time saved...
Developing
To develop cqdm locally:
- Create a fresh
venv - Install
tqdmwithpip install tqdm - Build the C-extension with
python setup.py build - Install it with
python setup.py install - Run the demo with
python demo/demo.py
Performance
To generate performance graphs:
- Install
matplotlibwithpython3 -m pip install matplotlib - If on linux, then it might be necessary to install a gui backend for
plt.show()to function. Do so withsudo apt-get install python3-tk - Generate the performance graph with
python demo/performance.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
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 cqdm-1.0.5-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.
File metadata
- Download URL: cqdm-1.0.5-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 8.2 kB
- Tags: PyPy, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc662bd3d56d0f800666cb27c5ac69b0bbbd2cf6ef5cc4065b94bb072248bb6e
|
|
| MD5 |
cc67c022a98046bce754c929606529f3
|
|
| BLAKE2b-256 |
f405448146b879ee911f86d575c0b906b07f165ef06f28bfa2509bdcc5e6b419
|
File details
Details for the file cqdm-1.0.5-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.
File metadata
- Download URL: cqdm-1.0.5-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 8.2 kB
- Tags: PyPy, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77a1babe2671c34e5a943d19349ba17a7d138c00dab957ffc69d35794a2a5b14
|
|
| MD5 |
1b8eac8d2c00ad5637c0572c8ed9043d
|
|
| BLAKE2b-256 |
d9ff3b948e9b3e1924f89b48e82eae38c156702d2c466de63d34b3bb5658d611
|
File details
Details for the file cqdm-1.0.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.
File metadata
- Download URL: cqdm-1.0.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 22.1 kB
- Tags: CPython 3.10, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05afbbd278fdadd38ef2214212742194835491dca0922a7b81c344c8558af7a2
|
|
| MD5 |
85f5bda9fcf173ac32b3d7d6be4037e6
|
|
| BLAKE2b-256 |
8b9ab98b97fbcdf3b865b02f1ef8b391f6b446a2360f86dbf9c77d451d943c43
|
File details
Details for the file cqdm-1.0.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.
File metadata
- Download URL: cqdm-1.0.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 21.6 kB
- Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57def352d67f5f32176338a4012b0416af34b11e31a19d85be2313027ba93067
|
|
| MD5 |
eb566a4f71e16a5e0c046244a1ecfec1
|
|
| BLAKE2b-256 |
55acfcf43be2c319cabc02518b174c58e66b7bf1e53be4e94a3ff9a935975011
|
File details
Details for the file cqdm-1.0.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.
File metadata
- Download URL: cqdm-1.0.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 21.5 kB
- Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d26cf88a5088775b36ddb436de77a118c891f9e0912eecdc537c314cf3ac127
|
|
| MD5 |
6c90d614f8cccbaadc122991dada702c
|
|
| BLAKE2b-256 |
f6e79d95b704f536eb4753747b03f606a78b58967b6eac02e5f750051ee4af17
|
File details
Details for the file cqdm-1.0.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.
File metadata
- Download URL: cqdm-1.0.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 21.8 kB
- Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f4396e21e26779af35d3940a27b4de16eaa86987653b72cce4e996cb995b492
|
|
| MD5 |
59da8ad8f04cc1386f6318429bb4ad7b
|
|
| BLAKE2b-256 |
49063f45aa2551a83531676417cef729fe7c39b8651c84773e5bdccc6fa463af
|
File details
Details for the file cqdm-1.0.5-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.
File metadata
- Download URL: cqdm-1.0.5-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 20.9 kB
- Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
155a38dbb0083b73b3210a6c5f9da63a583bd93b2b553fbe1ffaccbeab29e349
|
|
| MD5 |
1778a407baca016ae0baff7f9f7c6867
|
|
| BLAKE2b-256 |
fe4049a6a13aaf836d7bebc0809c591a447f1b1f054deb1954d25d35524e336b
|