Skip to main content

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for cyheapq, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size cyheapq-0.1.1.tar.gz (72.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page