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.2.1.tar.gz (7.6 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.2.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

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

Hashes for speedsense-0.2.1.tar.gz
Algorithm Hash digest
SHA256 143c14a20c9fd199b2f9658b7aac39d90de4b183fb2e3b2c32a0b93e40e777a2
MD5 e3b34f1c30a5d3464540cdc59935da2a
BLAKE2b-256 a63c571e4d83570b79b644a9808b4f025c7fdb79144c5f04896f8ad2ca92a674

See more details on using hashes here.

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

Hashes for speedsense-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7437b9cf50c5da7be76d2e96852f77b49cb1f98896cf8bd44387ab5c601978aa
MD5 687a17ca92f42c71bcd2247441a8db30
BLAKE2b-256 f69999e733c7e690971e360bfc48bd8d711a332466a71fd4eb6ba75718adb8e1

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