funcmeasure
Project description
funcmeasure
Description
Measure and compare function execution times
Install
pip install funcmeasure
# or
pip3 install funcmeasure
Usage
from funcmeasure import measure
def f1():
5**2
def f2():
5**2**10
measure([f1, f2], times=1000)
This will print:
Ran 1000 times
-------------------------------------
| rank | name | duration | perc |
-------------------------------------
| 1 | f1 | 0.00000019 | 1x |
| 2 | f2 | 0.00000227 | 11.79x |
-------------------------------------
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
funcmeasure-0.0.2.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for funcmeasure-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 115e08f45816bb4b1f28d741cc416829b4aa4d726316a3a65a624d12131b5d5d |
|
MD5 | bcbd3b5faca3a3aa0a4fba25e4ae3200 |
|
BLAKE2b-256 | 0b2bd5ce119e6d167df1083f76498e73997af42e3b9df8ec9ae3e7762d99451e |