recache
Cache functions to speed up recursion
install
From Pypi:
python -m pip install recache
From GitHub:
python -m pip install git+https://github.com/donno2048/recache
Usage
from recache import cache
def fib(n): # slow recursion
if n < 0: return None
if n <= 1: return 1
return fib(n - 1) + fib(n - 2)
@cache
def cfib(n): # fast recursion
if n < 0: return None
if n <= 1: return 1
return cfib(n - 1) + cfib(n - 2)
To see the exact timing see The notebook
Metadata
Release files for recache 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| recache-1.0.0.tar.gz | 1.4 kB | Without provenance | Details for recache-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| recache-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for recache-1.0.0-py3-none-any.whl |
Total release size: 3.8 kB
Release files / recache-1.0.0.tar.gz
| Download URL | recache-1.0.0.tar.gz |
|---|---|
| Size | 1.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
245e613d8bfb7b684b68ca33bb3092da994ff9634b16f5cbdb859fcbdd7257cd
|
|
BLAKE2b-256 checksum How to use checksums |
ef813058a299ff4a6da8aa73450e3eaf2121e41e0edb6ccd829166a4141cec9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.9.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Release files / recache-1.0.0-py3-none-any.whl
| Download URL | recache-1.0.0-py3-none-any.whl |
|---|---|
| Size | 2.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8f2d38ed3d2ecbab658802fee48e608a06c2cd478246d8ce157785055d7763b6
|
|
BLAKE2b-256 checksum How to use checksums |
c265ca407bcbc279d5738e8c9fc9e88117546cb6e6e6b4684f1bcdeec619e2af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.9.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Security for recache 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.