Skip to main content

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:

  1. Single-variable input functions
  2. Non-recursive functions
  3. 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

MIT

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

speedsense-0.1.2.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

speedsense-0.1.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file speedsense-0.1.2.tar.gz.

File metadata

  • Download URL: speedsense-0.1.2.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for speedsense-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ebead897345848a0cd00721d9296563a5727f6e63b395501311ce9148517f982
MD5 e7da85a2a9117db2913b00d715cbad4a
BLAKE2b-256 d6f95abc6a4f6ec041300d45dee9e944bc3d2330382103b72adb03f3062ebff5

See more details on using hashes here.

File details

Details for the file speedsense-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: speedsense-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for speedsense-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 60c963370a29d0bb9134d72c4b2d52b6511390a01df8c3a1aa03261020057c0e
MD5 997c349c0fe7718e70e92d23cc07e145
BLAKE2b-256 c4c7bf5f7d0f40bbe4862a70e4a5c16e5bc9002c19ed73e334c6ab9dfd263f0e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page