breaking-point.py
breaking-point.py helps to find a size of input data where one function starts outperform another function. It is a convenient way to compare different algorithms for a single task.
INSTALLATION
pip install breaking-point
USAGE
from breaking_point import find_breaking_point
find_breaking_point(f1, f2, input_generator, start=1, step=1, limit=1000000, trial_count=1000, repeat_count=3)
there
f1, f2 - functions to compare.
inpurt_generator - function that takes n argument (size of input on current iteration) and returns input data for f1 and f2. Return value should be a tuple with first element - list of non-keyworded arguments and second element - dict of keyword arguments.
start - initial input data size.
step - step of iteration.
limit - maximum amount of input data. If breaking point was not found until limit was reached - iteration stops.
trial_count - number of executions with each input data size.
repeat_count - repeat trial several times and use average performance result.
Function returns n0 - size of input data for which f2(n0) executed faster than f1(n0) or None if reaches limit.
EXAMPLE
See example.py.
LICENSE
MIT
Metadata
Release files for breaking-point 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| breaking-point-0.1.0.tar.gz | 3.0 kB | Without provenance | Details for breaking-point-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| breaking_point-0.1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for breaking_point-0.1.0-py2.py3-none-any.whl |
Total release size: 8.9 kB
Release files / breaking-point-0.1.0.tar.gz
| Download URL | breaking-point-0.1.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5508d275dff47d116a1430262ccb520f125438f28eb325aaa94af75f08be0bc7
|
|
BLAKE2b-256 checksum How to use checksums |
9c99639f3a21d40063111335202e81c1d50d33b5c1e0c87e148c5edc12a2ab3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / breaking_point-0.1.0-py2.py3-none-any.whl
| Download URL | breaking_point-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
ec1430a9ec037b1460d308e9a838d6355d0ca111040c77631f862f70342bc50b
|
|
BLAKE2b-256 checksum How to use checksums |
61e1d132773a82e98a9bd40a63091983f6cf4691e2ae27ecdce424a6268aa199
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for breaking-point 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.