FastPyX 🚀
FastPyX is a high-performance C extension for Python, designed to optimize memory usage and significantly improve execution speed.
Why FastPyX?
🔥 Faster than Python's built-in list for fappend operations
📉 Uses up to 56% less memory than Python lists
⚡ Ideal for high-performance applications requiring optimized data structures
Features
- 🚀 Written in C for extreme performance
- 📌 Optimized
FastListimplementation (efficientfappendmethod) - 🔹 Supports multiple data types seamlessly
- 🔧 Efficient memory allocation to reduce fragmentation
- 🔄 Convert to Python list (
to_list) for compatibility - 📊 Fast random access (
fget) and optimized length retrieval (len())
Installation
To install FastPyX:
pip install fastpyx
Usage
import fastpyx
fl = fastpyx.FastList()
# Append values
for i in range(10):
fl.fappend(i)
# Print all elements
fl.fprint()
# Access an element
index = 5
value = fl.fget(index)
print(f"Index {index}: {value}")
# Convert to Python list
py_list = fl.to_list()
print("Converted list:", py_list)
# Get length
print("Length:", len(fl))
Benchmark Results
| Operation | FastList | Python List | Speedup | Memory Usage (10M items) |
|---|---|---|---|---|
fappend |
0.56s | 0.67s | 🔥 17% Faster | 30.5MB (FastList) vs. 69MB (Python List) |
fget |
0.0067s | 0.0062s | Slightly slower (needs optimization) | - |
to_list |
0.8999s | 0.124s | Needs improvement | - |
✅ FastList is both faster and more memory-efficient than Python's built-in list!
📜 License
MIT License. Feel free to contribute and improve FastPyX!
🔗 Future Roadmap
✅ Optimize to_list performance
✅ Add slicing support
✅ Implement iterator support for better compatibility
✅ Advanced memory management optimizations for Django and other frameworks
✅ Additional performance improvements for lists, dictionaries, and sets
✅ More Pythonic API and integration with NumPy/Pandas
Release files for fastpyx 0.5.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 | |
|---|---|---|---|
| fastpyx-0.5.4.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fastpyx-0.5.4-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details |
Total release size: 12.8 kB
Release files / fastpyx-0.5.4.tar.gz
| Download URL | fastpyx-0.5.4.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
047092bfaf6d8fdeee2eb266035b33b64118ea8c99ee60d63e5c4541cfb7579a
|
|
BLAKE2b-256 checksum How to use checksums |
55788f7e13089069da231723f8eeb9c238beb9ea937bd4835fe07bc580d0c50e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / fastpyx-0.5.4-cp312-cp312-win_amd64.whl
| Download URL | fastpyx-0.5.4-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 8.7 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
32ab1b4b5b166ccccb2a77584d4fb458605f5f13eecfb053084aea2b5491d3f6
|
|
BLAKE2b-256 checksum How to use checksums |
82ac7860594c8b0dde55c2194c24cc311286c2961bc1b8a91d748bb368e4e66e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|