fastqueue
Single-ended fast queues built in C tuned for Python.
Requirements
python 3.7+
Installation
To install fastqueue, using pip:
pip install fastqueue-lib
Quickstart
For general use cases fastqueue.Queue() objects are tuned to perform well.
The enqueue and dequeue methods perform well over a large sequence of arbitrary operations.
fastqueue.Queue() supports many standard sequence methods similar to lists.
fastqueue.Queue() minimizes memory usage but maintains the fast queue speeds.
>>> from fastqueue import Queue
>>> queue = Queue()
>>> queue.extend(['🚒', '🛴'])
>>> queue[0]
'🚒'
>>> '🛴' in queue
True
>>> queue.enqueue('🚅')
>>> queue.enqueue('🚗')
>>> queue[-1]
'🚗'
>>> [queue.dequeue() for _ in range(len(queue)) ]
['🚒', '🛴', '🚅', '🚗']
For more specialized cases fastqueue.QueueC() objects are tuned to perform well.
The interface for fastqueue.QueueC() is identical to fastqueue.Queue().
The enqueue and dequeue methods perform similarly well over a large sequence of arbitrary operations.
fastqueue.QueueC() handles memory differently by doubling the capacity when full.
This increases the complexity but maintains fast amortized cost.
The benefit of this approach is even faster __getitem__ and __setitem__ speeds
>>> from fastqueue import QueueC
>>> queue_c = QueueC()
>>> queue_c.extend(['🚒', '🛴'])
>>> queue_c[0]
'🚒'
>>> '🛴' in queue_c
True
>>> queue_c.enqueue('🚅')
>>> queue_c.enqueue('🚗')
>>> queue_c[-1]
'🚗'
>>> [queue_c.dequeue() for _ in range(len(queue_c)) ]
['🚒', '🛴', '🚅', '🚗']
Example Benchmarks
Queue operations
Ubuntu
Windows
Iteration
Ubuntu
Windows
Metadata
Release files for fastqueue-lib 0.0.18
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 |
|---|---|---|---|---|
| fastqueue_lib-0.0.18.tar.gz | 20.1 kB | Without provenance | Details for fastqueue_lib-0.0.18.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fastqueue_lib-0.0.18-cp39-cp39-manylinux1_x86_64.manylinux_2_5_x86_64.whl | CPython 3.9 | CPython 3.9 | Linux glibc 2.5+ x86-64 | Details for fastqueue_lib-0.0.18-cp39-cp39-manylinux1_x86_64.manylinux_2_5_x86_64.whl |
Total release size: 82.1 kB
Release files / fastqueue_lib-0.0.18.tar.gz
| Download URL | fastqueue_lib-0.0.18.tar.gz |
|---|---|
| Size | 20.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
40cef8aa9da0b75761b80d066811965eb476ccb06686b78be5a21a92dbd1863a
|
|
BLAKE2b-256 checksum How to use checksums |
eac67d6bf864c3ddc31b1979ae289648a1ea6397a9d874cfb68ca36ce3684541
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / fastqueue_lib-0.0.18-cp39-cp39-manylinux1_x86_64.manylinux_2_5_x86_64.whl
| Download URL | fastqueue_lib-0.0.18-cp39-cp39-manylinux1_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 62.0 kB |
| Tags | CPython 3.9 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
117799695e997ddf657b9814e2344c8b92daa681bd0dbbb4e34a57275ddb59ac
|
|
BLAKE2b-256 checksum How to use checksums |
145213cc4233ac49a36ccc72a8a718c062e5496e180a9a47ebf2d2d4b26df589
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for fastqueue-lib 0.0.18
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.