Heapq in Cython
Project description
This module is an adaptation of merge, nlargest and nsmallest from the heapq module in Cython. This makes it just a tad bit faster.
x 1.5 for nlargest and nsmallest (given a particular micro benchnmark of course). x 3 for merge. nlargest performance is comparable with cytoolz.topk (but cyheapq also provides nsmallest). merge is around 8 times faster than cytoolz.merge_sorted. The microbenchmark used involves sifting / merging 10e6 random floats.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cyheapq-0.1.1.tar.gz
(72.1 kB
view details)
File details
Details for the file cyheapq-0.1.1.tar.gz.
File metadata
- Download URL: cyheapq-0.1.1.tar.gz
- Upload date:
- Size: 72.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8b0128b3ed2c9ebd15747d43d00855fe8d74ad3abd41639ba7e1034413e5cc3
|
|
| MD5 |
0e1ec5e2e3e306505f7da7745f3f8c77
|
|
| BLAKE2b-256 |
f4fee0aaa3adff986c1f4643f63e7b9ab6c70a316a0f19fa5ac680f1bc274e1f
|