Skip to main content

Example complexity graph

Bigot

Benchmarking library with Space and Time Complexity estimation.
Pull requests are welcome !

Installation

pip install bigot

Usage

Provide a benchmark function with a single dimension parameter

def on(n):
    x = 10000000*"-"*int(n)
    sleep(0.001*n)

import bigot
print("Function has a space complexity of", bigot.Space(on2),
      "and a time complexity of", bigot.Time(on2))
Function has a space complexity of O(n^2) and a time complexity of O(n^2)

You can test our fancy options. See docstrings for reference.

bench = bigot.Time(
    on2,
    plot=True,
    duration=1,
    verbose=True,
    name="My fancy function"
)

And check the number of iterations, useful when comparing functions

print(bench.iterations, "iterations in", bench.duration, "seconds")
8 iterations in 8 seconds

You can also compare multiple functions

def on2(n):
    x = 10000000*"-"*int(n**2)
    sleep(0.001*n**2)

print(bigot.Compare([on, on2]).space())
  Name  Duration  Iterations Space complexity
0   On       1.0        49.0             O(n)
1  On2       1.0         8.0           O(n^2)

Testing

pytest .

Release files for bigot 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bigot 1.0.2
File Size Uploaded
bigot-1.0.2.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bigot 1.0.2
File Interpreter ABI Platform
bigot-1.0.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 8.5 kB

Release files / bigot-1.0.2.tar.gz

Download URL bigot-1.0.2.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
54c0bfd3668076e580810df10674c344211bfc671bd33ba464a453f9f1ac8d3f
BLAKE2b-256 checksum
How to use checksums
c5f265d7e0b3fb890bb0157818d21591b59c0a78c86cfa855ef13ca5b59deea1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.47.0 CPython/3.8.5

Release files / bigot-1.0.2-py2.py3-none-any.whl

Download URL bigot-1.0.2-py2.py3-none-any.whl
Size 4.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
6c4bd03438468e23832d383a515aa6c92bb6bed1ef8b95fa5007df69a862f50c
BLAKE2b-256 checksum
How to use checksums
fd456e633a1f928e56a90bdbe8b41a9a04f7323b1510be553cf1844981da67e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.47.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page