⚡ superfastpy
Zero-configuration Python function accelerator.
Just add @fast — superfastpy analyzes your code and applies the best backend automatically.
No compilation. No configuration. No learning curve.
🚀 Installation
pip install superfastpy
🔥 Quick Start
from superfastpy import fast
@fast
def sum_squares(arr):
total = 0.0
for i in range(len(arr)):
total += arr[i] * arr[i]
return total
That's it. superfastpy automatically detects the loop and compiles it to machine code via Numba JIT.
🧠 How it works
superfastpy analyzes your function's AST (Abstract Syntax Tree) at decoration time and selects the best backend:
| Code Pattern | Backend | Description |
|---|---|---|
| Nested loops | numba_parallel |
Auto-converts range → prange for true parallelism |
| Simple loops | numba |
JIT-compiled to machine code |
| Array / math ops | numpy |
Vectorized execution |
| Everything else | native |
No overhead added |
🎯 Decorators
@fast — Auto mode
@fast
def my_func(arr):
...
# Or with options
@fast(backend="numba", verbose=True)
def my_func(arr):
...
@fast.parallel — Force parallel
@fast.parallel
def dot_product(a, b):
result = 0.0
for i in range(len(a)): # ← superfastpy auto-converts to prange
result += a[i] * b[i]
return result
superpy rewrites range → prange via AST transformation automatically. No manual changes needed.
@fast.cache — Accelerate + cache results
@fast.cache
def heavy_compute(arr):
total = 0.0
for i in range(len(arr)):
total += arr[i] * arr[i]
return total
heavy_compute(arr) # computed
heavy_compute(arr) # cache hit — instant return
🛠️ Utilities
from superfastpy import info, benchmark, cache_stats
info(my_func) # prints backend info
benchmark(my_func, arr) # measures average execution time
cache_stats(my_func) # prints cache hit rate
📊 Benchmark Results
sum_squares → numba 0.0008ms
matrix_sum → numba_parallel 0.0100ms (small array; parallel shines on large data)
parallel_dot → numba_parallel 0.0088ms
heavy_compute → numba+cache 0.0125ms (cache hit rate: 75%)
add → native 0.0002ms
📄 License
MIT License
Metadata
Release files for superfastpy 26.7.4
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 |
|---|---|---|---|---|
| superfastpy-26.7.4.tar.gz | 18.2 kB | Without provenance | Details for superfastpy-26.7.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| superfastpy-26.7.4-py3-none-any.whl | Python 3 | none | any | Details for superfastpy-26.7.4-py3-none-any.whl |
Total release size: 37.8 kB
Release files / superfastpy-26.7.4.tar.gz
| Download URL | superfastpy-26.7.4.tar.gz |
|---|---|
| Size | 18.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b5342a8fc6d0f74cd76674495cecc13aeacc6158fa486f68272d20e395ee8816
|
|
BLAKE2b-256 checksum How to use checksums |
4483b60c2387ef3556218d58c60c2f36b4c1c351727dc3e7ca431015149c7d70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / superfastpy-26.7.4-py3-none-any.whl
| Download URL | superfastpy-26.7.4-py3-none-any.whl |
|---|---|
| Size | 19.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
74238f86bb2b49c6fe046e984839c925c38ecf510837ddc18c42d60d8dfa03aa
|
|
BLAKE2b-256 checksum How to use checksums |
239416322f2f5b6754e1efbdc88362f12c00447dbc138e86b967a134c85b68ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for superfastpy 26.7.4
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.