Time complexity analyser
Project description
SpeedSense
This is a Python package that tries to give its users the time complexity of any function you desire. There are limitations to this library, which we are still working on.
Currently, the types of functions for which the library works are:
- Single-variable input functions
- Non-recursive functions
- In-built library support is not available at the moment
Installation
Use the package manager pip to install speedsense:
pip install speedsense
Usage
For using this package you need inspect which is a part of Python Standard Library so no need to install it separately.
from speedsense.tc_estimator import compute_complexity
import inspect
def userfunc(n):
# write your function here
pass
code = inspect.getsource(userfunc)
compute_complexity(code) # prints the time complexity
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 speedsense-0.2.1.tar.gz.
File metadata
- Download URL: speedsense-0.2.1.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
143c14a20c9fd199b2f9658b7aac39d90de4b183fb2e3b2c32a0b93e40e777a2
|
|
| MD5 |
e3b34f1c30a5d3464540cdc59935da2a
|
|
| BLAKE2b-256 |
a63c571e4d83570b79b644a9808b4f025c7fdb79144c5f04896f8ad2ca92a674
|
File details
Details for the file speedsense-0.2.1-py3-none-any.whl.
File metadata
- Download URL: speedsense-0.2.1-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7437b9cf50c5da7be76d2e96852f77b49cb1f98896cf8bd44387ab5c601978aa
|
|
| MD5 |
687a17ca92f42c71bcd2247441a8db30
|
|
| BLAKE2b-256 |
f69999e733c7e690971e360bfc48bd8d711a332466a71fd4eb6ba75718adb8e1
|