Skip to content

bndl/cyheapq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CyHeapQ - HeapQ in Cython

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.

About

CyHeapQ - HeapQ in Cython

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages