Compute and plot timing scalings for functions with numpy array inputs
Project description
xyzt: compute and plot time cost scaling for functions with numpy array input
I often implement functions on atom positions in terms of Nx3 numpy arrays,
and need to compare speed of different implementations.
This small library is a thin wrapper over timeit for that purpose.
xyzt.timethem(functions_to_check, nmin=10, nmax=1e5, number=1e5) -> (n, times)
xyzt.plot(n, times, labels=None)
for fi in functions:
for n in valid_range:
generate random n-dimensional input vector
timeit fi(v_rand)
example: scipy.spatial.distance.cdist+min versus scipy.spatial.cKDTree
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
xyzt-0.0.1.tar.gz
(2.5 kB
view details)
File details
Details for the file xyzt-0.0.1.tar.gz.
File metadata
- Download URL: xyzt-0.0.1.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.5.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5f494c1e3be9229567e49687956805b5e8ddfd663165407ec2de14bbed35d9f
|
|
| MD5 |
28fdcb10ef71eebb1579d11e22bd7bed
|
|
| BLAKE2b-256 |
3e208a9ccf6c24fc2627ea66ee3fbe976cebb2dabd32553f376a4c2d7092f04f
|