parallel_buffered_sort from C++ for Python (Windows)
Project description
parallel_buffered_sort from C++ for Python (Windows)
pip install cppparallelbufferedsort
Microsoft Visual C++ Redistributable is necessary
https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170
from cppparallelbufferedsort import parallel_buffered_sort
import numpy as np
a1 = np.random.randint(0, 2000000, 1000000)
a2 = parallel_buffered_sort(a1)
fl = a1 / 3
f2 = parallel_buffered_sort(fl)
# Out[6]:
# array([0.00000000e+00, 6.66666667e-01, 1.33333333e+00, ...,
# 6.66664333e+05, 6.66664667e+05, 6.66664667e+05])
# %timeit parallel_buffered_sort(fl)
# 18.4 ms ± 128 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
# %timeit np.sort(fl)
# 61.5 ms ± 90.1 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
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
cppparallelbufferedsort-0.10.tar.gz
(183.9 kB
view details)
Built Distribution
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 cppparallelbufferedsort-0.10.tar.gz.
File metadata
- Download URL: cppparallelbufferedsort-0.10.tar.gz
- Upload date:
- Size: 183.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c0028696a68b7ba66bcb80ff7b9fd022cc17f4c9e4a6b4c0b39c82b7bbe3da5
|
|
| MD5 |
48e2daa4c748bf8c2b8842097b240e03
|
|
| BLAKE2b-256 |
4ab17ce30a564317937fb28b87a19ec038034fcada2f2517089a56db1858b8e2
|
File details
Details for the file cppparallelbufferedsort-0.10-py3-none-any.whl.
File metadata
- Download URL: cppparallelbufferedsort-0.10-py3-none-any.whl
- Upload date:
- Size: 184.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8610e872dff4046cdd89e644c24cb12816cf6ee142d8722a86bdaeaee169029
|
|
| MD5 |
59728a81b88f0eeb9328ef0ed199680a
|
|
| BLAKE2b-256 |
80d6bb56d74fe138a1f5324c3710fb0d8493ea57f420e120f3826e26aa8bd418
|